/[enigma]/enigma/src/player.cc
ViewVC logotype

Diff of /enigma/src/player.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by ant_39, Thu May 22 17:48:24 2003 UTC revision 1.19 by reallysoft, Tue May 27 11:08:09 2003 UTC
# Line 403  resurrect_actor (unsigned pl, Actor *a) Line 403  resurrect_actor (unsigned pl, Actor *a)
403  static bool  static bool
404  AllPlayersDead()  AllPlayersDead()
405  {  {
406      bool all_players_dead=true;      bool     all_players_dead = true;
407      unsigned old_player = icurrent_player;      unsigned old_player       = icurrent_player;
408    
409      for (unsigned i=0; i<players.size(); ++i) {      for (unsigned i=0; i<players.size(); ++i) {
410          bool actors_dead=true;          bool actors_dead=true;
411          for (unsigned j=0; j<players[i].actors.size(); ++j) {          for (unsigned j=0; j<players[i].actors.size(); ++j) {
# Line 413  AllPlayersDead() Line 414  AllPlayersDead()
414                  all_players_dead = actors_dead = false;                  all_players_dead = actors_dead = false;
415          }          }
416          if (actors_dead && i==icurrent_player) {          if (actors_dead && i==icurrent_player) {
417                if (!AllowTogglePlayer) {
418                    all_players_dead = true;
419                    break;
420                }
421    
422              // Switch to next player if this one is dead              // Switch to next player if this one is dead
423              unsigned nextplayer = (icurrent_player+1) % players.size();              unsigned nextplayer = (icurrent_player+1) % players.size();
424              SetCurrentPlayer (nextplayer);              SetCurrentPlayer (nextplayer);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26