Normalize pitch angles

Prob not needed, but other unclamped angles/vectors were able to crash games in the past, so just normalize this too.
This commit is contained in:
Amos 2023-08-15 20:19:38 +02:00
parent 3ff85c174a
commit 75e327e447
2 changed files with 4 additions and 3 deletions

View File

@ -30,6 +30,7 @@ int ReadUserCmd(bf_read* buf, CUserCmd* move, CUserCmd* from)
// Viewangles must be normalized; applying invalid angles on the client
// will result in undefined behavior, or a crash.
move->viewangles.Normalize();
move->pitchangles.Normalize();
// Some players abused a feature of the engine which allows you to perform
// custom weapon activities. After some research, it appears that only the

View File

@ -48,7 +48,7 @@ public:
int32_t tick_count;
float_t command_time;
QAngle viewangles;
char pad_0x0018[12];
QAngle pitchangles; // Pitch angles? See [r5apex_ds+705D80].
float_t forwardmove;
float_t sidemove;
float_t upmove;
@ -56,9 +56,9 @@ public:
byte impulse;
byte cycleslot;
byte weaponindex;
__int16 weaponselect;
short weaponselect;
bool bUnk39;
__int16 weaponactivity;
short weaponactivity;
int nUnk3C;
bool controllermode;
bool fixangles;