equal
deleted
inserted
replaced
769 break; |
769 break; |
770 } |
770 } |
771 |
771 |
772 case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */ |
772 case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */ |
773 if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) { |
773 if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) { |
774 PlayerID i; |
774 Player *p; |
775 |
775 |
776 _opt_ptr = &_opt; |
776 _opt_ptr = &_opt; |
777 |
777 |
778 _local_player = OWNER_NONE; |
778 _local_player = OWNER_NONE; |
779 _generating_world = true; |
779 _generating_world = true; |
780 // delete all players. |
780 /* Delete all players */ |
781 for (i = 0; i != MAX_PLAYERS; i++) { |
781 FOR_ALL_PLAYERS(p) { |
782 ChangeOwnershipOfPlayerItems(i, OWNER_SPECTATOR); |
782 if (p->is_active) { |
783 _players[i].is_active = false; |
783 ChangeOwnershipOfPlayerItems(p->index, OWNER_SPECTATOR); |
|
784 p->is_active = false; |
|
785 } |
784 } |
786 } |
785 _generating_world = false; |
787 _generating_world = false; |
786 // delete all stations owned by a player |
788 // delete all stations owned by a player |
787 DeleteAllPlayerStations(); |
789 DeleteAllPlayerStations(); |
788 } else { |
790 } else { |