mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
ensure scenario path is set when loading a saved game
This commit is contained in:
@@ -694,6 +694,8 @@ int game_load_save(const char *path)
|
||||
|
||||
load_palette();
|
||||
gfx_invalidate_screen();
|
||||
|
||||
scenario_set_filename((char*)0x0135936C);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -358,6 +358,12 @@ void scenario_end()
|
||||
window_park_objective_open();
|
||||
}
|
||||
|
||||
void scenario_set_filename(const char *value)
|
||||
{
|
||||
subsitute_path(_scenarioPath, RCT2_ADDRESS(RCT2_ADDRESS_SCENARIOS_PATH, char), value);
|
||||
_scenarioFileName = path_get_filename(_scenarioPath);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0066A752
|
||||
|
||||
@@ -407,6 +407,7 @@ void scenario_update();
|
||||
unsigned int scenario_rand();
|
||||
int scenario_prepare_for_save();
|
||||
int scenario_save(char *path, int flags);
|
||||
void scenario_set_filename(const char *value);
|
||||
void scenario_failure();
|
||||
void scenario_success();
|
||||
void scenario_success_submit_name(const char *name);
|
||||
|
||||
Reference in New Issue
Block a user