diff options
| author | Narendra Umate <[email protected]> | 2013-12-08 01:27:41 -0800 |
|---|---|---|
| committer | Narendra Umate <[email protected]> | 2013-12-08 01:27:41 -0800 |
| commit | 4fa56874ba1557274c10077bf8386ece4c61dbd6 (patch) | |
| tree | e2d336604e960b548e996d2e7dcfc5a1e1401b9e /mp/src/game/server/player.cpp | |
| parent | Added DS_Store to .gitignore. (diff) | |
| parent | Make libSDL2.so/dylib into symlinks. (diff) | |
| download | source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.tar.xz source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.zip | |
Merge remote-tracking branch 'upstream/master'
Reverted .gitattributes xcode_ccache_wrapper change. Fixed line endings
for .gitignore and .gitattributes.
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 - //----------------------------------------------------------------------------- |