Raptor007 / aq2-tng

Action Quake 2: The Next Generation. Raptor007's sandbox for testing changes. When verified stable, this code is pushed to the official aq2-tng repo:
https://github.com/aq2-tng/aq2-tng/tree/bots
4 stars 2 forks source link

out of sync footsteps with sv_fps > 10 #124

Open m4son opened 2 years ago

m4son commented 2 years ago

Some players are reporting out-of-sync footsteps when playing on sv_fps enabled server. Could this be solved like it was solved for guns with sync_guns ? issue https://github.com/Raptor007/aq2-tng/issues/56

Raptor007 commented 2 years ago

Relevant code is here: https://github.com/Raptor007/aq2-tng/blob/ef8feeb86c060c85090f24404b18dfe3d7ca2e8f/source/p_view.c#L984-L1000

It determines when to play a footstep sound by current_client->bobtime + bobmove reaching the next integer value, which could happen on any frame; it's why the simple if (!FRAMESYNC) check doesn't work and was commented-out. However, if it were to add bobmove * game.framediv instead, then it could be checked on FRAMESYNC and should behave the way it does at 10fps.