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

Roll angle should reset at end map scores. #109

Closed Raptor007 closed 2 years ago

Raptor007 commented 3 years ago

There's a slight roll angle applied to the view when strafing, and if you are strafing when the map ends, that tilt remains on the end of map camera. It should reset to straight up. Not very important, but I also don't think it'll be hard to fix.

Raptor007 commented 2 years ago

This might be caused by SV_CalcRoll or SV_CalcViewOffset in p_view.c if ent->velocity does not get cleared at map end.

Raptor007 commented 2 years ago

Might work to just VectorClear(ent->velocity); in p_hud.c MoveClientToIntermission.

Edit: Nope, didn't work.

Raptor007 commented 2 years ago

Aha, this is where those values get set: https://github.com/Raptor007/aq2-tng/blob/7fcea7db86db9087bd9217f50db31ca9bdbb7792/source/p_view.c#L297 https://github.com/Raptor007/aq2-tng/blob/7fcea7db86db9087bd9217f50db31ca9bdbb7792/source/p_view.c#L330-L335

So the solution is VectorClear(ent->client->ps.kick_angles); in MoveClientToIntermission.