From 0d8dceea4310fde5706b3ce1c70609d72a38efdf Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Wed, 9 Sep 2015 18:35:41 -0700 Subject: Updated the SDK with the latest code from the TF and HL2 branches. --- mp/src/game/server/player_command.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mp/src/game/server/player_command.cpp') diff --git a/mp/src/game/server/player_command.cpp b/mp/src/game/server/player_command.cpp index b607bbab..bf77b5d4 100644 --- a/mp/src/game/server/player_command.cpp +++ b/mp/src/game/server/player_command.cpp @@ -23,6 +23,7 @@ extern CMoveData *g_pMoveData; // This is a global because it is subclassed by e extern ConVar sv_noclipduringpause; ConVar sv_maxusrcmdprocessticks_warning( "sv_maxusrcmdprocessticks_warning", "-1", FCVAR_NONE, "Print a warning when user commands get dropped due to insufficient usrcmd ticks allocated, number of seconds to throttle, negative disabled" ); +static ConVar sv_maxusrcmdprocessticks_holdaim( "sv_maxusrcmdprocessticks_holdaim", "1", FCVAR_CHEAT, "Hold client aim for multiple server sim ticks when client-issued usrcmd contains multiple actions (0: off; 1: hold this server tick; 2+: hold multiple ticks)" ); //----------------------------------------------------------------------------- // Purpose: @@ -442,6 +443,12 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper // Copy output FinishMove( player, ucmd, g_pMoveData ); + // If we have to restore the view angle then do so right now + if ( !player->IsBot() && ( gpGlobals->tickcount - player->GetLockViewanglesTickNumber() < sv_maxusrcmdprocessticks_holdaim.GetInt() ) ) + { + player->pl.v_angle = player->GetLockViewanglesData(); + } + // Let server invoke any needed impact functions VPROF_SCOPE_BEGIN( "moveHelper->ProcessImpacts" ); moveHelper->ProcessImpacts(); -- cgit v1.2.3