From 5526438653c8c7ada887b9847f222f17610e7e3e Mon Sep 17 00:00:00 2001 From: stpohle Date: Thu, 30 Sep 2004 21:01:10 +0000 Subject: [PATCH] Team Play had a small bug. but is now working again.. the end wasn't right --- src/game.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game.c b/src/game.c index 54fb937..ac37064 100644 --- a/src/game.c +++ b/src/game.c @@ -1,4 +1,4 @@ -/* $Id: game.c,v 1.96 2004/09/30 20:35:09 stpohle Exp $ +/* $Id: game.c,v 1.97 2004/09/30 21:01:10 stpohle Exp $ game.c - procedures for the game. */ #include @@ -324,13 +324,17 @@ int game_check_endgame () { int h_team = 0; // how many human teams are alife int ateam = 0; // teams which are alife int h_team_last = -1; // last human team which was alife + int team_last = -1; // last teams which was alift _player *p; for (t_nr = 0; t_nr < MAX_TEAMS; t_nr++) for (p_nr = 0; p_nr < MAX_PLAYERS; p_nr++) if (teams[t_nr].players[p_nr] != NULL) { p = teams[t_nr].players[p_nr]; if (PS_IS_used (p->state) && PS_IS_alife (p->state)) { - ateam++; + if (team_last != t_nr) { + team_last = t_nr; + ateam++; + } if ((!PS_IS_aiplayer (p->state)) && h_team_last != t_nr) { h_team++; h_team_last = t_nr;