UCyborg / BerserkerQuake2

Berserker@Quake2 game engine, ported to SDL2 library.
GNU General Public License v2.0
20 stars 9 forks source link

CL_ParseServerMessage: Illegible server message #13

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi, looks like net_compatibility 1 is not enough to play on most servers online since most of them are q2pro servers on which u get this kind of error while connecting or on map change, the same error happens on original quake 2 version 3.20.

Here is my console log from berserker client: q2b_console.log

Q2pro author Skuller told me what might be wrong:

Thanks for testing! I think I know what this issue is. It's an old Quake 2 bug whereas any literal 0xff bytes in a string would be read as -1 on the client, which would mess up message parsing because -1 also acts as EOF marker. Apparently Yamagi fixes this but the bug is still present in Berserker and original 3.20 client of course.

What's actually happening is a combination of two bugs: original bug in client message parsing code, and a bug in OpenTDM version that PacketFlinger.com servers use which triggers it by including random uninitialized bytes from stack at the end of global CS_STATUSBAR configstring. See here:

02a0 : 66 20 32 38 20 78 6c 20 31 30 20 79 62 20 2d 31 : f 28 xl 10 yb -1
02b0 : 00 0d 0e 00 38 30 20 73 74 61 74 5f 73 74 72 69 : ....80 stat_stri
02c0 : 6e 67 20 32 38 20 65 6e 64 69 66 20 ff 03 00 0d : ng 28 endif ....
02d0 : 1d 00 30 00 0d 1e 00 32 35 00 0d 1f 00 38 30 37 : ..0....25....807

ff 03 bytes are just junk. So this issue is definitely not Q2PRO server issue.

OpenTDM mod is already in progress to fix issue mod side, but i tried connecting to some other mod servers and issue is still there so is there any chance you guys can fix it in berserker please? Here is the link to issue on q2pro github https://github.com/skullernet/q2pro/issues/305