From 99cabd2ac8614456d431d37213b7046a180da4d6 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:44:19 +0200 Subject: [PATCH] UserCmd: cleanup variable names and comments Reversed some extra field names + adjusted comment for clamping ucmd->camerapos (this was tested and works, this field should be clamped). --- r5dev/game/shared/usercmd.cpp | 3 +-- r5dev/game/shared/usercmd.h | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/r5dev/game/shared/usercmd.cpp b/r5dev/game/shared/usercmd.cpp index ef1403ea..4d5ee354 100644 --- a/r5dev/game/shared/usercmd.cpp +++ b/r5dev/game/shared/usercmd.cpp @@ -27,8 +27,7 @@ int ReadUserCmd(bf_read* buf, CUserCmd* move, CUserCmd* from) const int seed = v_ReadUserCmd(buf, move, from); // Initialize the camera position as <0,0,0>, this should at least avoid - // crash and meme behaviors. Has not been tested yet unlike all the - // patches performed below. + // crash and meme behaviors. if (!move->camerapos.IsValid()) move->camerapos.Init(); diff --git a/r5dev/game/shared/usercmd.h b/r5dev/game/shared/usercmd.h index ae357700..e964c45b 100644 --- a/r5dev/game/shared/usercmd.h +++ b/r5dev/game/shared/usercmd.h @@ -48,12 +48,15 @@ public: int32_t command_number; int32_t tick_count; float_t command_time; + QAngle viewangles; QAngle pitchangles; // Pitch angles? See [r5apex_ds+705D80]. + float_t forwardmove; float_t sidemove; float_t upmove; int32_t buttons; + byte impulse; byte cycleslot; byte weaponindex; @@ -64,12 +67,18 @@ public: bool controllermode; bool fixangles; bool setlastcycleslot; - char pad_0x0034[157]; - QAngle renderangles; // IDK what this is used for. - QAngle renderangles_copy; // IDK what this is used for. + char pad_0x0034[149]; + + // Zipline vars (see [r5apex_ds+8A6573] for read). + bool placedZiplineStation; + char unk[3]; + int nUnkDC; + Vector3D beginStationOrigin; + Vector3D stationWorldRelative; float fUnkF8; - QAngle another_renderangles_copy; // IDK what this is used for. - QAngle yet_another_renderangles_copy; // IDK what this is used for. + Vector3D endStationOrigin; + QAngle stationWorldAngles; + char pad_0x00114[112]; int32_t randomseed; byte bUnk188;