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).
This commit is contained in:
Kawe Mazidjatari 2024-04-12 00:44:19 +02:00
parent 2587392f88
commit 99cabd2ac8
2 changed files with 15 additions and 7 deletions

View File

@ -27,8 +27,7 @@ int ReadUserCmd(bf_read* buf, CUserCmd* move, CUserCmd* from)
const int seed = v_ReadUserCmd(buf, move, from); const int seed = v_ReadUserCmd(buf, move, from);
// Initialize the camera position as <0,0,0>, this should at least avoid // 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 // crash and meme behaviors.
// patches performed below.
if (!move->camerapos.IsValid()) if (!move->camerapos.IsValid())
move->camerapos.Init(); move->camerapos.Init();

View File

@ -48,12 +48,15 @@ public:
int32_t command_number; int32_t command_number;
int32_t tick_count; int32_t tick_count;
float_t command_time; float_t command_time;
QAngle viewangles; QAngle viewangles;
QAngle pitchangles; // Pitch angles? See [r5apex_ds+705D80]. QAngle pitchangles; // Pitch angles? See [r5apex_ds+705D80].
float_t forwardmove; float_t forwardmove;
float_t sidemove; float_t sidemove;
float_t upmove; float_t upmove;
int32_t buttons; int32_t buttons;
byte impulse; byte impulse;
byte cycleslot; byte cycleslot;
byte weaponindex; byte weaponindex;
@ -64,12 +67,18 @@ public:
bool controllermode; bool controllermode;
bool fixangles; bool fixangles;
bool setlastcycleslot; bool setlastcycleslot;
char pad_0x0034[157]; char pad_0x0034[149];
QAngle renderangles; // IDK what this is used for.
QAngle renderangles_copy; // IDK what this is used for. // Zipline vars (see [r5apex_ds+8A6573] for read).
bool placedZiplineStation;
char unk[3];
int nUnkDC;
Vector3D beginStationOrigin;
Vector3D stationWorldRelative;
float fUnkF8; float fUnkF8;
QAngle another_renderangles_copy; // IDK what this is used for. Vector3D endStationOrigin;
QAngle yet_another_renderangles_copy; // IDK what this is used for. QAngle stationWorldAngles;
char pad_0x00114[112]; char pad_0x00114[112];
int32_t randomseed; int32_t randomseed;
byte bUnk188; byte bUnk188;