openttd.c
changeset 4848 45f848b46222
parent 4840 a76d40e0aea4
child 4850 93095755db8c
equal deleted inserted replaced
4847:84e4a64db23c 4848:45f848b46222
   584 
   584 
   585 static void MakeNewGameDone(void)
   585 static void MakeNewGameDone(void)
   586 {
   586 {
   587 	/* In a dedicated server, the server does not play */
   587 	/* In a dedicated server, the server does not play */
   588 	if (_network_dedicated) {
   588 	if (_network_dedicated) {
   589 		_local_player = OWNER_SPECTATOR;
   589 		_local_player = PLAYER_SPECTATOR;
   590 		return;
   590 		return;
   591 	}
   591 	}
   592 
   592 
   593 	/* Create a single player */
   593 	/* Create a single player */
   594 	DoStartupNewPlayer(false);
   594 	DoStartupNewPlayer(false);
   792 			_local_player = OWNER_NONE;
   792 			_local_player = OWNER_NONE;
   793 			_generating_world = true;
   793 			_generating_world = true;
   794 			/* Delete all players */
   794 			/* Delete all players */
   795 			FOR_ALL_PLAYERS(p) {
   795 			FOR_ALL_PLAYERS(p) {
   796 				if (p->is_active) {
   796 				if (p->is_active) {
   797 					ChangeOwnershipOfPlayerItems(p->index, OWNER_SPECTATOR);
   797 					ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR);
   798 					p->is_active = false;
   798 					p->is_active = false;
   799 				}
   799 				}
   800 			}
   800 			}
   801 			_generating_world = false;
   801 			_generating_world = false;
   802 			_patches_newgame.starting_year = _cur_year;
   802 			_patches_newgame.starting_year = _cur_year;
   872 
   872 
   873 static void DoAutosave(void)
   873 static void DoAutosave(void)
   874 {
   874 {
   875 	char buf[200];
   875 	char buf[200];
   876 
   876 
   877 	if (_patches.keep_all_autosave && _local_player != OWNER_SPECTATOR) {
   877 	if (_patches.keep_all_autosave && _local_player != PLAYER_SPECTATOR) {
   878 		const Player *p = GetPlayer(_local_player);
   878 		const Player *p = GetPlayer(_local_player);
   879 		char *s;
   879 		char *s;
   880 		sprintf(buf, "%s%s", _path.autosave_dir, PATHSEP);
   880 		sprintf(buf, "%s%s", _path.autosave_dir, PATHSEP);
   881 
   881 
   882 		SetDParam(0, p->name_1);
   882 		SetDParam(0, p->name_1);