Page 1 of 1

Packet 0xA8

Posted: Sun Apr 01, 2007 11:30 am
by Developer Silver
In core-changes there's a fix on 12-27
12-27 MuadDib
Fixed : Server IP is now sent in correct order in the 0xA8 packet.
but I've tested 0xA8 packet today and it seems that server IP address is sent in normal order, not in reversed order like guide says...
I've wrote a packet hook to reverse the 4 numbers, and now server dialog correctly shows latency and packet loss...
I mean: the old fix has no effect?

This is my hook:

Code: Select all

exported function sendinfo( who, byref packet )

	const HEADER_BYTE := 6;
	const SERVER_SIZE := 40;

	var num := packet.GetInt16(HEADER_BYTE-2);

	var base;
	for i := 1 to num;
		base := HEADER_BYTE+(i-1)*SERVER_SIZE;

		packet.SetInt8(base+35, 1);	// Timezone

		var ip1 := packet.GetInt8(base+36);
		var ip2 := packet.GetInt8(base+37);
		var ip3 := packet.GetInt8(base+38);
		var ip4 := packet.GetInt8(base+39);

		packet.SetInt8(base+36, ip4);
		packet.SetInt8(base+37, ip3);
		packet.SetInt8(base+38, ip2);
		packet.SetInt8(base+39, ip1);
	endfor

endfunction

Posted: Sun Apr 01, 2007 11:31 am
by MuadDib
Actually, it ping pongs depending on client version

In my testing, different era clients do it different. NO CLUE WHY..... aholes at EA. Newer clients use it forward, some older forward, some older backwards, etc.

Posted: Sun Apr 01, 2007 11:35 am
by Developer Silver
I'm using 5.0.8.2 for now, if you need knowing that :)

Posted: Sun Apr 01, 2007 11:39 am
by tekproxy
Since different clients handle it differently, it'll probably have to be controlled via a packet hook and someone will have to create a list of what clients like what, which could quickly grow if there is enough feedback. Hopefully it doesn't change between subversions but big revisions like from 4 to 5.... Probably not though...