(svn r13731) -Codechange: make a pool of the array of players.

This commit is contained in:
rubidium
2008-07-18 16:40:29 +00:00
parent 56ad26a3aa
commit cde65455ac
38 changed files with 173 additions and 242 deletions

View File

@@ -562,20 +562,19 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
/* Set generating_world to true to get instant-green grass after removing
* player property. */
_generating_world = true;
/* Delete all players */
FOR_ALL_PLAYERS(p) {
if (p->is_active) {
ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR);
p->is_active = false;
}
}
_generating_world = false;
/* Delete all stations owned by a player */
Station *st;
FOR_ALL_STATIONS(st) {
if (IsValidPlayerID(st->owner)) delete st;
}
/* Delete all players */
FOR_ALL_PLAYERS(p) {
ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR);
delete p;
}
_generating_world = false;
}
}