fte-team/fteqw

Player rotation does not update past [0,360] angle range on 32 bit builds, desyncs server/client

vichoca9 opened this issue · 2 comments

I've been testing on both linux32 and win32 builds and player desyncs while looking past these ranges. Tried with and without sv_nqplayerphysics enabled.

WriteAngle/ReadAngle (in their various forms) use +/-180, not 0-360. values outside the range are pointless and are expected to wrap, which reduces network bloat.
anglemod apparently uses 0-360 though, just adding 360 if its <0.
Interpolation will need to be aware of it wrapping too, otherwise it'll suddenly spin the wrong way when crossing the boundary.

pitch angles are further clamped to +80/-70, so that you can't accidentally look behind yourself.

so I don't understand why you're saying 0-360 unless its your own code calling anglemod.

simplescreenrecorder-2023-11-30_23.56.42.mp4

See near the end how the shooting direction does not sync with player pos. When the player seems to move weirdly, its because movement keys also desync, so if I press WASD, it moves in another direction.

The mod tested was nzp, and since the fork is using latest upstream, it seems a fteqw issue (also happens in vanilla build).