Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/server/neo/neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3365,7 +3365,7 @@ int CNEO_Player::OnTakeDamage_Alive(const CTakeDamageInfo& info)
{
m_rfAttackersScores.GetForModify(attackerIdx) += Min(iDamage, GetHealth());
m_rfAttackersAccumlator.Set(attackerIdx, flDmgAccumlator);
m_rfAttackersHits.GetForModify(attackerIdx) += 1;
m_rfAttackersHits.GetForModify(attackerIdx) += info.GetNumDamageEvents();

if (bIsTeamDmg && sv_neo_teamdamage_kick.GetBool() && NEORules()->IsRoundLive())
{
Expand Down
8 changes: 8 additions & 0 deletions src/game/shared/takedamageinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ void CTakeDamageInfo::Init( CBaseEntity *pInflictor, CBaseEntity *pAttacker, CBa
m_bForceFriendlyFire = false;
m_flDamageForForce = 0.f;
m_eCritType = CRIT_NONE;

#ifdef NEO
m_iNumDamageEvents = 0;
#endif // NEO
}

CTakeDamageInfo::CTakeDamageInfo()
Expand Down Expand Up @@ -255,6 +259,10 @@ void AddMultiDamage( const CTakeDamageInfo &info, CBaseEntity *pEntity )
g_MultiDamage.SetPlayerPenetrationCount( info.GetPlayerPenetrationCount() );
}

#ifdef NEO
g_MultiDamage.IncrementNumDamageEvents();
#endif // NEO

bool bHasPhysicsForceDamage = !g_pGameRules->Damage_NoPhysicsForce( info.GetDamageType() );
if ( bHasPhysicsForceDamage && g_MultiDamage.GetDamageType() != DMG_GENERIC )
{
Expand Down
8 changes: 8 additions & 0 deletions src/game/shared/takedamageinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ class CTakeDamageInfo
//private:
void CopyDamageToBaseDamage();

#ifdef NEO
void IncrementNumDamageEvents() { m_iNumDamageEvents++; }
int GetNumDamageEvents() const { return m_iNumDamageEvents; }
#endif // NEO

protected:
void Init( CBaseEntity *pInflictor, CBaseEntity *pAttacker, CBaseEntity *pWeapon, const Vector &damageForce, const Vector &damagePosition, const Vector &reportedPosition, float flDamage, int bitsDamageType, int iKillType );

Expand All @@ -139,6 +144,9 @@ class CTakeDamageInfo
float m_flDamage;
float m_flMaxDamage;
float m_flBaseDamage; // The damage amount before skill leve adjustments are made. Used to get uniform damage forces.
#ifdef NEO
int m_iNumDamageEvents;
#endif // NEO
int m_bitsDamageType;
int m_iDamageCustom;
int m_iDamageStats;
Expand Down