diff --git a/sfall/FalloutEngine/VariableOffsets.h b/sfall/FalloutEngine/VariableOffsets.h index 6916edda..3d8e5a68 100644 --- a/sfall/FalloutEngine/VariableOffsets.h +++ b/sfall/FalloutEngine/VariableOffsets.h @@ -45,6 +45,7 @@ #define FO_VAR_colorTable 0x6A38D0 #define FO_VAR_combat_end_due_to_load 0x517F98 #define FO_VAR_combat_free_move 0x56D39C +#define FO_VAR_combat_highlight 0x56D38C #define FO_VAR_combat_list 0x56D390 #define FO_VAR_combat_obj 0x51805C #define FO_VAR_combat_state 0x510944 diff --git a/sfall/Modules/MiscPatches.cpp b/sfall/Modules/MiscPatches.cpp index 56b3711a..af4b885b 100644 --- a/sfall/Modules/MiscPatches.cpp +++ b/sfall/Modules/MiscPatches.cpp @@ -120,7 +120,10 @@ static void __declspec(naked) intface_item_reload_hook() { call fo::funcoffs::register_begin_; mov eax, dword ptr ds:[FO_VAR_obj_dude]; call fo::funcoffs::register_object_animate_; + mov ecx, dword ptr ds:[FO_VAR_combat_highlight]; // backup setting + mov dword ptr ds:[FO_VAR_combat_highlight], eax; // prevent calling combat_outline_off_ (eax is never 2) call fo::funcoffs::register_end_; + mov dword ptr ds:[FO_VAR_combat_highlight], ecx; // restore setting pop eax; jmp fo::funcoffs::gsound_play_sfx_file_; }