From b1ce08a78f844c8b9ddb8a03df6764c3c89fe370 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Thu, 19 Oct 2023 15:13:37 +0800 Subject: [PATCH] Fixed crash when calling start_gdialog outside talk_p_proc (the fix was embedded in StartGDialogFix, now it works regardless of the option.) --- sfall/Modules/BugFixes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfall/Modules/BugFixes.cpp b/sfall/Modules/BugFixes.cpp index 0a1840dfb..31436d2ee 100644 --- a/sfall/Modules/BugFixes.cpp +++ b/sfall/Modules/BugFixes.cpp @@ -3712,6 +3712,10 @@ void BugFixes::init() { if (IniReader::GetConfigInt("Misc", "StartGDialogFix", 0)) { dlogr("Applying start_gdialog argument fix.", DL_FIX); MakeCall(0x456F08, op_start_gdialog_hack); + } else { + // Fix crash when calling start_gdialog outside of the talk_p_proc procedure for talking heads + __int64 data = 0x900C24448B; // mov eax, [esp + 0x3C - 0x30] (fix dialog_target) + SafeWriteBytes(0x456F08, (BYTE*)&data, 5); } // Fix for Heave Ho! perk increasing Strength stat above 10 when determining the maximum range of thrown weapons