Skip to content

Commit ef0b313

Browse files
committed
Merge branch 'master' of https://github.com/sfall-team/sfall
2 parents be7d4f6 + 345815e commit ef0b313

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sfall/Modules/BugFixes.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,15 @@ static __declspec(naked) void gdProcessUpdate_hack() {
596596
}
597597
}
598598

599+
static __declspec(naked) void gdProcessUpdate_hook() {
600+
__asm {
601+
pop edi; // ret addr
602+
call fo::funcoffs::text_to_rect_func_; // return _optionRect.y
603+
mov [ebp + 0x39C], eax; // dialogOptionEntry->bottom = _optionRect.y
604+
jmp edi;
605+
}
606+
}
607+
599608
static __declspec(naked) void invenWieldFunc_item_get_type_hook() {
600609
__asm {
601610
mov edx, esi;
@@ -3609,6 +3618,9 @@ void BugFixes::init() {
36093618
MakeCall(0x447021, gdProcessUpdate_hack, 1);
36103619
//}
36113620

3621+
// Fix for display issues when highlighting a multiline dialogue option
3622+
HookCall(0x447071, gdProcessUpdate_hook);
3623+
36123624
// Fix for "Unlimited Ammo" exploit
36133625
dlogr("Applying fix for Unlimited Ammo exploit.", DL_FIX);
36143626
HookCall(0x472957, invenWieldFunc_item_get_type_hook); // hooks item_get_type_()

0 commit comments

Comments
 (0)