Skip to content

Commit

Permalink
add radius to CTakeDamageInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurdead committed Apr 11, 2021
1 parent 2f8cf5c commit a2dac1b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion game/shared/takedamageinfo.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//========= Copyright ? 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
Expand Down Expand Up @@ -80,6 +80,9 @@ class CTakeDamageInfo
void SetAmmoType( int iAmmoType );
const char * GetAmmoName() const;

float GetRadius() const;
void SetRadius( float fRadius );

void Set( CBaseEntity *pInflictor, CBaseEntity *pAttacker, float flDamage, int bitsDamageType, int iKillType = 0 );
void Set( CBaseEntity *pInflictor, CBaseEntity *pAttacker, CBaseEntity *pWeapon, float flDamage, int bitsDamageType, int iKillType = 0 );
void Set( CBaseEntity *pInflictor, CBaseEntity *pAttacker, const Vector &damageForce, const Vector &damagePosition, float flDamage, int bitsDamageType, int iKillType = 0, Vector *reportedPosition = NULL );
Expand Down Expand Up @@ -113,6 +116,7 @@ class CTakeDamageInfo
int m_iDamageCustom;
int m_iDamageStats;
int m_iAmmoType; // AmmoType of the weapon used to cause this damage, if any
float m_flRadius;

DECLARE_SIMPLE_DATADESC();
};
Expand Down Expand Up @@ -331,6 +335,16 @@ inline void CTakeDamageInfo::CopyDamageToBaseDamage()
m_flBaseDamage = m_flDamage;
}

inline float CTakeDamageInfo::GetRadius() const
{
return m_flRadius;
}

inline void CTakeDamageInfo::SetRadius( float flRadius )
{
m_flRadius = flRadius;
}


// -------------------------------------------------------------------------------------------------- //
// Inlines.
Expand Down

0 comments on commit a2dac1b

Please sign in to comment.