{
game.restart_game_message = NULL;
- if (Request(message, REQ_ASK | REQ_STAY_CLOSED))
+ boolean has_started_game = hasStartedNetworkGame();
+ int request_mode = (has_started_game ? REQ_ASK : REQ_CONFIRM);
+
+ if (Request(message, request_mode | REQ_STAY_CLOSED) && has_started_game)
{
StartGameActions(network.enabled, setup.autorecord, level.random_seed);
}
}
if (last_game_over != game_over)
- game.restart_game_message = "Game over! Play it again?";
+ game.restart_game_message = (hasStartedNetworkGame() ?
+ "Game over! Play it again?" :
+ "Game over!");
last_game_over = game_over;
}
return(EMPTY_PLAYER_NAME);
}
+boolean hasStartedNetworkGame(void)
+{
+ return !network_level.use_network_level_files;
+}
+
static boolean hasPathSeparator(char *s)
{
return (strchr(s, '/') != NULL);
#define NETWORK_STOP_BY_ERROR 1
char *getNetworkPlayerName(int);
+boolean hasStartedNetworkGame(void);
boolean ConnectToServer(char *, int);
void SendToServer_PlayerName(char *);