Team Play had a small bug. but is now working again.. the end wasn't right

origin
stpohle 21 years ago
parent 5d698dd000
commit 5526438653

@ -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. */ game.c - procedures for the game. */
#include <string.h> #include <string.h>
@ -324,13 +324,17 @@ int game_check_endgame () {
int h_team = 0; // how many human teams are alife int h_team = 0; // how many human teams are alife
int ateam = 0; // teams which are alife int ateam = 0; // teams which are alife
int h_team_last = -1; // last human team which was alife int h_team_last = -1; // last human team which was alife
int team_last = -1; // last teams which was alift
_player *p; _player *p;
for (t_nr = 0; t_nr < MAX_TEAMS; t_nr++) for (p_nr = 0; p_nr < MAX_PLAYERS; p_nr++) 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) { if (teams[t_nr].players[p_nr] != NULL) {
p = teams[t_nr].players[p_nr]; p = teams[t_nr].players[p_nr];
if (PS_IS_used (p->state) && PS_IS_alife (p->state)) { 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) { if ((!PS_IS_aiplayer (p->state)) && h_team_last != t_nr) {
h_team++; h_team++;
h_team_last = t_nr; h_team_last = t_nr;

Loading…
Cancel
Save