Skip to content

Commit 78dfb53

Browse files
committed
Moved LoadHeroAppearance() from MainMenuHook to NewGame2. No reason to run it on the main menu where player appearance can't display.
1 parent d588f2e commit 78dfb53

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sfall/LoadGameHook.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ static void NewGame2() {
247247
dlogr("Starting new game", DL_MAIN);
248248

249249
SetNewCharAppearanceGlobals();
250+
250251
LoadGlobalScripts();
251252
CritLoad();
253+
LoadHeroAppearance();
252254
mapLoaded = true;
253255
}
254256

@@ -271,15 +273,14 @@ static void ReadExtraGameMsgFilesIfNeeded() {
271273
}
272274

273275
static bool PipBoyAvailableAtGameStart = false;
274-
static void __declspec(naked) MainMenu() {
276+
static void __declspec(naked) MainMenuHook() {
275277
__asm {
276278
pushad;
277279
push 0;
278280
call ResetState;
279281
mov al, PipBoyAvailableAtGameStart;
280282
mov byte ptr ds:[_gmovie_played_list + 0x3], al;
281283
call ReadExtraGameMsgFilesIfNeeded;
282-
call LoadHeroAppearance;
283284
popad;
284285
call main_menu_loop_;
285286
retn;
@@ -465,7 +466,7 @@ void LoadGameHookInit() {
465466
HookCall(0x443B1C, SaveGame);
466467
HookCall(0x48FCFF, SaveGame);
467468

468-
HookCall(0x480A28, MainMenu);
469+
HookCall(0x480A28, MainMenuHook);
469470

470471
HookCall(0x483668, WorldMapHook);
471472
HookCall(0x4A4073, WorldMapHook);

0 commit comments

Comments
 (0)