From 63cec64a4a0cfbb6e39447ddd7ac3178e92b6c49 Mon Sep 17 00:00:00 2001 From: Ted John Date: Thu, 29 Sep 2016 17:38:35 +0100 Subject: [PATCH] Fix #3460: Starting server with bad save file ends with bad game state --- src/rct2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rct2.c b/src/rct2.c index 0d4cb21075..9e4ae26c5c 100644 --- a/src/rct2.c +++ b/src/rct2.c @@ -360,15 +360,17 @@ bool rct2_open_file(const char *path) if (_stricmp(extension, "sv6") == 0) { strcpy((char*)gRCT2AddressSavedGamesPath2, path); - game_load_save(path); - gFirstTimeSave = 0; - return true; + if (game_load_save(path)) { + gFirstTimeSave = 0; + return true; + } } else if (_stricmp(extension, "sc6") == 0) { // TODO scenario install rct_scenario_basic scenarioBasic; strcpy(scenarioBasic.path, path); - scenario_load_and_play_from_path(scenarioBasic.path); - return true; + if (scenario_load_and_play_from_path(scenarioBasic.path)) { + return true; + } } else if (_stricmp(extension, "td6") == 0 || _stricmp(extension, "td4") == 0) { // TODO track design install return true;