mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-01-03 16:13:22 +08:00
Update CUserCmd.
This commit is contained in:
parent
e6c4fc4297
commit
08919e9cc7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user