Skip to content

Commit

Permalink
Moved LoadHeroAppearance() from MainMenuHook to NewGame2. No reason t…
Browse files Browse the repository at this point in the history
…o run it on the main menu where player appearance can't display.
  • Loading branch information
NovaRain committed Sep 19, 2017
1 parent d588f2e commit 78dfb53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sfall/LoadGameHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ static void NewGame2() {
dlogr("Starting new game", DL_MAIN);

SetNewCharAppearanceGlobals();

LoadGlobalScripts();
CritLoad();
LoadHeroAppearance();
mapLoaded = true;
}

Expand All @@ -271,15 +273,14 @@ static void ReadExtraGameMsgFilesIfNeeded() {
}

static bool PipBoyAvailableAtGameStart = false;
static void __declspec(naked) MainMenu() {
static void __declspec(naked) MainMenuHook() {
__asm {
pushad;
push 0;
call ResetState;
mov al, PipBoyAvailableAtGameStart;
mov byte ptr ds:[_gmovie_played_list + 0x3], al;
call ReadExtraGameMsgFilesIfNeeded;
call LoadHeroAppearance;
popad;
call main_menu_loop_;
retn;
Expand Down Expand Up @@ -465,7 +466,7 @@ void LoadGameHookInit() {
HookCall(0x443B1C, SaveGame);
HookCall(0x48FCFF, SaveGame);

HookCall(0x480A28, MainMenu);
HookCall(0x480A28, MainMenuHook);

HookCall(0x483668, WorldMapHook);
HookCall(0x4A4073, WorldMapHook);
Expand Down

0 comments on commit 78dfb53

Please sign in to comment.