aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/player.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-12-03 08:54:16 -0800
committerJoe Ludwig <[email protected]>2013-12-03 08:54:16 -0800
commitbeaae8ac45a2f322a792404092d4482065bef7ef (patch)
tree747f35193ba235f0f0b070c05b53468a54559c8e /mp/src/game/server/player.cpp
parentMake .xcconfigs text files too. (diff)
downloadsource-sdk-2013-beaae8ac45a2f322a792404092d4482065bef7ef.tar.xz
source-sdk-2013-beaae8ac45a2f322a792404092d4482065bef7ef.zip
Updated the SDK with the latest code from the TF and HL2 branches
* Adds support for Visual Studio 2012 and 2013 * VR Mode: . Switches from headtrack.dll to sourcevr.dll . Improved readability of the UI in VR . Removed the IPD calibration tool. TF2 will now obey the Oculus configuration file. Use the Oculus calibration tool in your SDK or install and run "OpenVR" under Tools in Steam to calibrate your IPD. . Added dropdown to enable VR mode in the Video options. Removed the -vr command line option. . Added the ability to switch in and out of VR mode without quitting the game . By default VR mode will run full screen. To switch back to a borderless window set the vr_force_windowed convar. . Added support for VR mode on Linux * Many assorted bug fixes and other changes from Team Fortress in various shared files
Diffstat (limited to 'mp/src/game/server/player.cpp')
-rw-r--r--mp/src/game/server/player.cpp16
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 -
//-----------------------------------------------------------------------------