(svn r5886) -Fix [FS#273]: Incomplete removal of player owned property due to lack of money.

This commit is contained in:
Darkvater
2006-08-14 11:44:19 +00:00
parent 4b030f190c
commit 01cd75cc10
3 changed files with 30 additions and 25 deletions

View File

@@ -771,16 +771,18 @@ void SwitchMode(int new_mode)
case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */
if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) {
PlayerID i;
Player *p;
_opt_ptr = &_opt;
_local_player = OWNER_NONE;
_generating_world = true;
// delete all players.
for (i = 0; i != MAX_PLAYERS; i++) {
ChangeOwnershipOfPlayerItems(i, OWNER_SPECTATOR);
_players[i].is_active = false;
/* Delete all players */
FOR_ALL_PLAYERS(p) {
if (p->is_active) {
ChangeOwnershipOfPlayerItems(p->index, OWNER_SPECTATOR);
p->is_active = false;
}
}
_generating_world = false;
// delete all stations owned by a player