video/dedicated_v.c
changeset 4300 687a17c9c557
parent 2791 f8ffac7515d4
child 4599 acdc5cac5b93
equal deleted inserted replaced
4299:b86602eaaff1 4300:687a17c9c557
    10 #include "../gfx.h"
    10 #include "../gfx.h"
    11 #include "../network.h"
    11 #include "../network.h"
    12 #include "../window.h"
    12 #include "../window.h"
    13 #include "../console.h"
    13 #include "../console.h"
    14 #include "../variables.h"
    14 #include "../variables.h"
       
    15 #include "../genworld.h"
    15 #include "dedicated_v.h"
    16 #include "dedicated_v.h"
    16 
    17 
    17 #ifdef BEOS_NET_SERVER
    18 #ifdef BEOS_NET_SERVER
    18 #include <net/socket.h>
    19 #include <net/socket.h>
    19 #endif
    20 #endif
   238 	_network_playas = OWNER_SPECTATOR;
   239 	_network_playas = OWNER_SPECTATOR;
   239 	_local_player = OWNER_SPECTATOR;
   240 	_local_player = OWNER_SPECTATOR;
   240 
   241 
   241 	/* If SwitchMode is SM_LOAD, it means that the user used the '-g' options */
   242 	/* If SwitchMode is SM_LOAD, it means that the user used the '-g' options */
   242 	if (_switch_mode != SM_LOAD) {
   243 	if (_switch_mode != SM_LOAD) {
       
   244 		StartNewGameWithoutGUI(GENERATE_NEW_SEED);
       
   245 		SwitchMode(_switch_mode);
   243 		_switch_mode = SM_NONE;
   246 		_switch_mode = SM_NONE;
   244 		GenRandomNewGame(Random(), InteractiveRandom());
       
   245 	} else {
   247 	} else {
   246 		_switch_mode = SM_NONE;
   248 		_switch_mode = SM_NONE;
   247 		/* First we need to test if the savegame can be loaded, else we will end up playing the
   249 		/* First we need to test if the savegame can be loaded, else we will end up playing the
   248 		 *  intro game... */
   250 		 *  intro game... */
   249 		if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL)) {
   251 		if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL)) {