diff options
Diffstat (limited to 'mp/src/game/server/player.cpp')
| -rw-r--r-- | mp/src/game/server/player.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mp/src/game/server/player.cpp b/mp/src/game/server/player.cpp index 9ae85cc0..73aab6d6 100644 --- a/mp/src/game/server/player.cpp +++ b/mp/src/game/server/player.cpp @@ -442,6 +442,7 @@ BEGIN_DATADESC( CBasePlayer ) DEFINE_INPUTFUNC( FIELD_INTEGER, "SetHealth", InputSetHealth ), DEFINE_INPUTFUNC( FIELD_BOOLEAN, "SetHUDVisibility", InputSetHUDVisibility ), DEFINE_INPUTFUNC( FIELD_STRING, "SetFogController", InputSetFogController ), + DEFINE_INPUTFUNC( FIELD_STRING, "HandleMapEvent", InputHandleMapEvent ), DEFINE_FIELD( m_nNumCrouches, FIELD_INTEGER ), DEFINE_FIELD( m_bDuckToggled, FIELD_BOOLEAN ), @@ -911,7 +912,7 @@ void CBasePlayer::TraceAttack( const CTakeDamageInfo &inputInfo, const Vector &v // Prevent team damage here so blood doesn't appear if ( info.GetAttacker()->IsPlayer() ) { - if ( !g_pGameRules->FPlayerCanTakeDamage( this, info.GetAttacker() ) ) + if ( !g_pGameRules->FPlayerCanTakeDamage( this, info.GetAttacker(), info ) ) return; } } @@ -1121,7 +1122,7 @@ int CBasePlayer::OnTakeDamage( const CTakeDamageInfo &inputInfo ) // go take the damage first - if ( !g_pGameRules->FPlayerCanTakeDamage( this, info.GetAttacker() ) ) + if ( !g_pGameRules->FPlayerCanTakeDamage( this, info.GetAttacker(), inputInfo ) ) { // Refuse the damage return 0; @@ -3311,7 +3312,8 @@ void CBasePlayer::PhysicsSimulate( void ) } #endif // _DEBUG - if ( int numUsrCmdProcessTicksMax = sv_maxusrcmdprocessticks.GetInt() ) + int numUsrCmdProcessTicksMax = sv_maxusrcmdprocessticks.GetInt(); + if ( gpGlobals->maxClients != 1 && numUsrCmdProcessTicksMax ) // don't apply this filter in SP games { // Grant the client some time buffer to execute user commands m_flMovementTimeForUserCmdProcessingRemaining += TICK_INTERVAL; @@ -8642,6 +8644,14 @@ void CBasePlayer::InputSetHealth( inputdata_t &inputdata ) } //----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CBasePlayer::InputHandleMapEvent( inputdata_t &inputdata ) +{ + Internal_HandleMapEvent( inputdata ); +} + +//----------------------------------------------------------------------------- // Purpose: Hides or displays the HUD // Input : &inputdata - //----------------------------------------------------------------------------- |