[colobot] 82/100: Prevent giving scoreboard points to team 0
Didier Raboud
odyx at moszumanska.debian.org
Thu Jun 1 18:10:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 904b7e580b596aaf0171ab9b7dcf8ccae48f4713
Author: krzys-h <krzys_h at interia.pl>
Date: Tue May 23 20:20:46 2017 +0200
Prevent giving scoreboard points to team 0
---
src/level/scoreboard.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp
index dc86eee..0f388c6 100644
--- a/src/level/scoreboard.cpp
+++ b/src/level/scoreboard.cpp
@@ -67,6 +67,7 @@ void CScoreboard::ProcessKill(CObject* target, CObject* killer)
for (auto& rule : m_rulesKill)
{
if ((rule->team == killer->GetTeam() || rule->team == 0) &&
+ killer->GetTeam() != 0 &&
rule->CheckForObject(target))
{
AddPoints(killer->GetTeam(), rule->score);
@@ -76,6 +77,7 @@ void CScoreboard::ProcessKill(CObject* target, CObject* killer)
void CScoreboard::ProcessEndTake(int team)
{
+ if (team == 0) return;
m_finishCounter++;
for (auto& rule : m_rulesEndTake)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list