tpoechtrager / wc-ng

WC-NG - Cube 2: Sauerbraten Modification
Other
21 stars 3 forks source link

client-side demo recorder builds wrong N_INITFLAGS packet #16

Closed sauerbraten closed 2 years ago

sauerbraten commented 2 years ago

When starting a client-side demo recording, a "fake" welcome packet is built using the wrong N_INITFLAGS packet: the demo recorder writes the client-to-server version of N_INITFLAGS, when it should write a server-to-client packet.

demorecorder's implementation: https://github.com/tpoechtrager/wc-ng/blob/d5ba6bd32feb00a83a1f22ee37dab7a42ea0be3f/src/fpsgame/client.cpp#L125

what that "fakes": https://github.com/tpoechtrager/wc-ng/blob/d5ba6bd32feb00a83a1f22ee37dab7a42ea0be3f/src/fpsgame/ctf.h#L749

what it should do: https://github.com/tpoechtrager/wc-ng/blob/d5ba6bd32feb00a83a1f22ee37dab7a42ea0be3f/src/fpsgame/ctf.h#L451

sauerbraten commented 2 years ago

For reference, here's how I patched ctf.h to be able to build the required packet in the client: https://github.com/sauerbraten/p1xbraten/blob/3233f4b1dcfb8216742c35aaee41146d9699b8af/src/fpsgame/ctf.h#L451