mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-01-04 00:23:25 +08:00
Update CTakeDamageInfo from 2013 sdk.
This commit is contained in:
parent
8c64091457
commit
7bbdf7da22
@ -57,10 +57,10 @@ void CTakeDamageInfo::Init( CBaseEntity *pInflictor, CBaseEntity *pAttacker, CBa
|
||||
m_vecDamagePosition = damagePosition;
|
||||
m_vecReportedPosition = reportedPosition;
|
||||
m_iAmmoType = -1;
|
||||
|
||||
m_iDamagedOtherPlayers = 0;
|
||||
m_iPlayerPenetrateCount = 0;
|
||||
m_flUnknown = 0.0f;
|
||||
m_iPlayerPenetrationCount = 0;
|
||||
m_flDamageBonus = 0.f;
|
||||
m_bForceFriendlyFire = false;
|
||||
}
|
||||
|
||||
CTakeDamageInfo::CTakeDamageInfo()
|
||||
@ -245,6 +245,11 @@ void AddMultiDamage( const CTakeDamageInfo &info, CBaseEntity *pEntity )
|
||||
g_MultiDamage.SetMaxDamage( MAX( g_MultiDamage.GetMaxDamage(), info.GetDamage() ) );
|
||||
g_MultiDamage.SetAmmoType( info.GetAmmoType() );
|
||||
|
||||
if ( g_MultiDamage.GetPlayerPenetrationCount() == 0 )
|
||||
{
|
||||
g_MultiDamage.SetPlayerPenetrationCount( info.GetPlayerPenetrationCount() );
|
||||
}
|
||||
|
||||
bool bHasPhysicsForceDamage = !g_pGameRules->Damage_NoPhysicsForce( info.GetDamageType() );
|
||||
if ( bHasPhysicsForceDamage && g_MultiDamage.GetDamageType() != DMG_GENERIC )
|
||||
{
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
void SetDamageCustom( int iDamageCustom );
|
||||
int GetDamageStats( void ) const;
|
||||
void SetDamageStats( int iDamageStats );
|
||||
void SetForceFriendlyFire( bool bValue ) { m_bForceFriendlyFire = bValue; }
|
||||
bool IsForceFriendlyFire( void ) const { return m_bForceFriendlyFire; }
|
||||
|
||||
int GetAmmoType() const;
|
||||
void SetAmmoType( int iAmmoType );
|
||||
@ -123,6 +125,7 @@ protected:
|
||||
int m_iDamagedOtherPlayers;
|
||||
int m_iPlayerPenetrationCount;
|
||||
float m_flDamageBonus; // Anything that increases damage (crit) - store the delta
|
||||
bool m_bForceFriendlyFire; // Ideally this would be a dmg type, but we can't add more
|
||||
|
||||
DECLARE_SIMPLE_DATADESC();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user