From c4237cc89cd769e999357300e57e4f53fef6983e Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 18 Sep 2015 15:26:24 -0400 Subject: [PATCH] Update CUserCmd. --- game/shared/usercmd.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/game/shared/usercmd.h b/game/shared/usercmd.h index 8e3d3e5a..e52423c3 100644 --- a/game/shared/usercmd.h +++ b/game/shared/usercmd.h @@ -1,4 +1,4 @@ -//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// +//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // @@ -51,6 +51,9 @@ public: weaponselect = 0; weaponsubtype = 0; random_seed = 0; +//#ifdef GAME_DLL + server_random_seed = 0; +//#endif mousedx = 0; mousedy = 0; @@ -76,6 +79,9 @@ public: weaponselect = src.weaponselect; weaponsubtype = src.weaponsubtype; random_seed = src.random_seed; +//#ifdef GAME_DLL + server_random_seed = src.server_random_seed; +//#endif mousedx = src.mousedx; mousedy = src.mousedy; @@ -116,6 +122,17 @@ public: return crc; } + // Allow command, but negate gameplay-affecting values + void MakeInert( void ) + { + viewangles = vec3_angle; + forwardmove = 0.f; + sidemove = 0.f; + upmove = 0.f; + buttons = 0; + impulse = 0; + } + // For matching server and client commands for debugging int command_number; @@ -140,6 +157,9 @@ public: int weaponsubtype; int random_seed; // For shared random functions +//#ifdef GAME_DLL + int server_random_seed; // Only the server populates this seed +//#endif short mousedx; // mouse accum in x from create move short mousedy; // mouse accum in y from create move