Prevent giving scoreboard points to team 0

master
krzys-h 2017-05-23 20:20:46 +02:00
parent 2d7911f155
commit 904b7e580b
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,7 @@ void CScoreboard::ProcessKill(CObject* target, CObject* killer)
for (auto& rule : m_rulesKill) for (auto& rule : m_rulesKill)
{ {
if ((rule->team == killer->GetTeam() || rule->team == 0) && if ((rule->team == killer->GetTeam() || rule->team == 0) &&
killer->GetTeam() != 0 &&
rule->CheckForObject(target)) rule->CheckForObject(target))
{ {
AddPoints(killer->GetTeam(), rule->score); AddPoints(killer->GetTeam(), rule->score);
@ -76,6 +77,7 @@ void CScoreboard::ProcessKill(CObject* target, CObject* killer)
void CScoreboard::ProcessEndTake(int team) void CScoreboard::ProcessEndTake(int team)
{ {
if (team == 0) return;
m_finishCounter++; m_finishCounter++;
for (auto& rule : m_rulesEndTake) for (auto& rule : m_rulesEndTake)
{ {