From 72b927a0a4ee25c788148e6591ff859d1f81df65 Mon Sep 17 00:00:00 2001 From: A1m` <33463136+A1mDev@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:26:17 +0700 Subject: [PATCH] Update `CUserCmd` class (#346) Add missing fields to class `CUserCmd`. --- game/shared/usercmd.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/game/shared/usercmd.h b/game/shared/usercmd.h index 86e0b0a0..dc7f8d64 100644 --- a/game/shared/usercmd.h +++ b/game/shared/usercmd.h @@ -55,9 +55,15 @@ public: mousedy = 0; hasbeenpredicted = false; + #if defined( HL2_DLL ) || defined( HL2_CLIENT_DLL ) entitygroundcontact.RemoveAll(); #endif + + // TrackIR + headangles.Init(); + headoffset.Init(); + // TrackIR } CUserCmd& operator =( const CUserCmd& src ) @@ -85,6 +91,11 @@ public: entitygroundcontact = src.entitygroundcontact; #endif + // TrackIR + headangles = src.headangles; + headoffset = src.headoffset; + // TrackIR + return *this; } @@ -152,6 +163,10 @@ public: CUtlVector< CEntityGroundContact > entitygroundcontact; #endif + // TrackIR + QAngle headangles; + Vector headoffset; + // TrackIR }; void ReadUsercmd( bf_read *buf, CUserCmd *move, CUserCmd *from );