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/baseentity.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'mp/src/game/server/baseentity.cpp') diff --git a/mp/src/game/server/baseentity.cpp b/mp/src/game/server/baseentity.cpp index 7a7a7e6c..9bd525a4 100644 --- a/mp/src/game/server/baseentity.cpp +++ b/mp/src/game/server/baseentity.cpp @@ -86,6 +86,7 @@ bool CBaseEntity::sm_bDisableTouchFuncs = false; // Disables PhysicsTouch and Ph bool CBaseEntity::sm_bAccurateTriggerBboxChecks = true; // set to false for legacy behavior in ep1 int CBaseEntity::m_nPredictionRandomSeed = -1; +int CBaseEntity::m_nPredictionRandomSeedServer = -1; CBasePlayer *CBaseEntity::m_pPredictionPlayer = NULL; // Used to make sure nobody calls UpdateTransmitState directly. @@ -1440,10 +1441,10 @@ int CBaseEntity::OnTakeDamage( const CTakeDamageInfo &info ) //----------------------------------------------------------------------------- // Purpose: Scale damage done and call OnTakeDamage //----------------------------------------------------------------------------- -void CBaseEntity::TakeDamage( const CTakeDamageInfo &inputInfo ) +int CBaseEntity::TakeDamage( const CTakeDamageInfo &inputInfo ) { if ( !g_pGameRules ) - return; + return 0; bool bHasPhysicsForceDamage = !g_pGameRules->Damage_NoPhysicsForce( inputInfo.GetDamageType() ); if ( bHasPhysicsForceDamage && inputInfo.GetDamageType() != DMG_GENERIC ) @@ -1475,12 +1476,12 @@ void CBaseEntity::TakeDamage( const CTakeDamageInfo &inputInfo ) // Make sure our damage filter allows the damage. if ( !PassesDamageFilter( inputInfo )) { - return; + return 0; } if( !g_pGameRules->AllowDamage(this, inputInfo) ) { - return; + return 0; } if ( PhysIsInCallback() ) @@ -1502,8 +1503,9 @@ void CBaseEntity::TakeDamage( const CTakeDamageInfo &inputInfo ) //Msg("%s took %.2f Damage, at %.2f\n", GetClassname(), info.GetDamage(), gpGlobals->curtime ); - OnTakeDamage( info ); + return OnTakeDamage( info ); } + return 0; } //----------------------------------------------------------------------------- @@ -6089,7 +6091,7 @@ void CBaseEntity::SetLocalAngles( const QAngle& angles ) { Warning( "Bad SetLocalAngles(%f,%f,%f) on %s\n", angles.x, angles.y, angles.z, GetDebugName() ); } - Assert( false ); + AssertMsg( false, "Bad SetLocalAngles(%f,%f,%f) on %s\n", angles.x, angles.y, angles.z, GetDebugName() ); return; } -- cgit v1.2.3