mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: client: do not let client.dll overwrite usercmd that's was read from demo
This commit is contained in:
parent
339711c3c7
commit
52061621ac
@ -622,7 +622,7 @@ CL_CreateCmd
|
|||||||
*/
|
*/
|
||||||
void CL_CreateCmd( void )
|
void CL_CreateCmd( void )
|
||||||
{
|
{
|
||||||
usercmd_t cmd;
|
usercmd_t nullcmd, *cmd;
|
||||||
runcmd_t *pcmd;
|
runcmd_t *pcmd;
|
||||||
vec3_t angles;
|
vec3_t angles;
|
||||||
qboolean active;
|
qboolean active;
|
||||||
@ -635,7 +635,6 @@ void CL_CreateCmd( void )
|
|||||||
// store viewangles in case it's will be freeze
|
// store viewangles in case it's will be freeze
|
||||||
VectorCopy( cl.viewangles, angles );
|
VectorCopy( cl.viewangles, angles );
|
||||||
ms = bound( 1, host.frametime * 1000, 255 );
|
ms = bound( 1, host.frametime * 1000, 255 );
|
||||||
memset( &cmd, 0, sizeof( cmd ));
|
|
||||||
input_override = 0;
|
input_override = 0;
|
||||||
|
|
||||||
CL_SetSolidEntities();
|
CL_SetSolidEntities();
|
||||||
@ -654,12 +653,18 @@ void CL_CreateCmd( void )
|
|||||||
pcmd->receivedtime = -1.0;
|
pcmd->receivedtime = -1.0;
|
||||||
pcmd->heldback = false;
|
pcmd->heldback = false;
|
||||||
pcmd->sendsize = 0;
|
pcmd->sendsize = 0;
|
||||||
|
cmd = &pcmd->cmd;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memset( &nullcmd, 0, sizeof( nullcmd ));
|
||||||
|
cmd = &nullcmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
active = (( cls.signon == SIGNONS ) && !cl.paused && !cls.demoplayback );
|
active = (( cls.signon == SIGNONS ) && !cl.paused && !cls.demoplayback );
|
||||||
Platform_PreCreateMove();
|
Platform_PreCreateMove();
|
||||||
clgame.dllFuncs.CL_CreateMove( host.frametime, &pcmd->cmd, active );
|
clgame.dllFuncs.CL_CreateMove( host.frametime, cmd, active );
|
||||||
IN_EngineAppendMove( host.frametime, &pcmd->cmd, active );
|
IN_EngineAppendMove( host.frametime, cmd, active );
|
||||||
|
|
||||||
CL_PopPMStates();
|
CL_PopPMStates();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user