mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Reverted GameReset in LoadGameHook.cpp to pre-4.1.4 behavior
(when the engine's game_reset is called, sfall will reset modules as well for consistency, closes #553)
This commit is contained in:
@@ -287,16 +287,15 @@ errorLoad:
|
||||
|
||||
// called whenever game is being reset (prior to loading a save or when returning to main menu)
|
||||
static bool __stdcall GameReset(DWORD isGameLoad) {
|
||||
if (gameLoaded) { // prevent resetting when a new game has not been started (loading saved game from main menu)
|
||||
onGameReset.invoke();
|
||||
if (isDebug) {
|
||||
char* str = (isGameLoad) ? "on Load" : "on Exit";
|
||||
fo::func::debug_printf("\nSFALL: [State reset %s]\n", str);
|
||||
}
|
||||
}
|
||||
onGameReset.invoke();
|
||||
inLoop = 0;
|
||||
gameLoaded = false;
|
||||
|
||||
if (isDebug) {
|
||||
char* str = (isGameLoad) ? "on Load" : "on Exit";
|
||||
fo::func::debug_printf("\nSFALL: [State reset %s]\n", str);
|
||||
}
|
||||
|
||||
return (isGameLoad) ? LoadGame_Before() : false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user