File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1568,7 +1568,21 @@ void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )
15681568 CBaseEntity *pAttacker = info.GetAttacker ();
15691569
15701570#ifdef BDSBASE
1571- if (pAttacker && (pAttacker != this || !FBitSet (m_iSuicideCustomKillFlags, EPlayerSuicideFlag_LockScore)))
1571+ if (HL2MPRules ()->IsTeamplay ())
1572+ {
1573+ // Check for the attacker being in team Unassigned to account
1574+ // for non-player attackers, which are in this team by default.
1575+ // In TDM, should only happen with deaths to non-player causes.
1576+ if (pAttacker && !pAttacker->InSameTeam (this ) && pAttacker->GetTeamNumber () != TEAM_UNASSIGNED)
1577+ {
1578+ pAttacker->GetTeam ()->AddScore (1 );
1579+ }
1580+ else
1581+ {
1582+ GetTeam ()->AddScore (-1 );
1583+ }
1584+ }
1585+ else if (pAttacker && (pAttacker != this || !FBitSet (m_iSuicideCustomKillFlags, EPlayerSuicideFlag_LockScore)))
15721586#else
15731587 if (pAttacker)
15741588#endif
You can’t perform that action at this time.
0 commit comments