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:
NovaRain
2024-06-29 17:35:43 +08:00
parent d9b59107af
commit dc3537747f
+3 -4
View File
@@ -287,15 +287,14 @@ 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();
inLoop = 0;
gameLoaded = false;
if (isDebug) {
char* str = (isGameLoad) ? "on Load" : "on Exit";
fo::func::debug_printf("\nSFALL: [State reset %s]\n", str);
}
}
inLoop = 0;
gameLoaded = false;
return (isGameLoad) ? LoadGame_Before() : false;
}