Changed the game mode check in gl_highlighting_lite

* now opening other interfaces (inventory, options, etc.) will also
turn off highlight.
This commit is contained in:
NovaRain
2024-06-09 12:09:05 +08:00
parent 803eeb4d27
commit 388a5de994
2 changed files with 4 additions and 4 deletions
@@ -106,7 +106,7 @@ procedure KeyPressHandler begin
scanCode := get_sfall_arg,
scanner, charges;
if scanCode == highlightKey and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
if scanCode == highlightKey and not(get_game_mode bwand bwnot(COMBAT bwor PCOMBAT)) then begin
if pressed then begin
set_global_script_repeat(REPEAT_FRAMES);
if motionScanner then begin
@@ -143,9 +143,9 @@ procedure CombatTurnHandler begin
end
end
// visual glitch fix, turn off highlight when opening loot/barter screens - for 3.8.29+
// visual glitch fix, turn off highlight when opening other interfaces - for 3.8.29+
procedure GameModeChangeHandler begin
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
if isHighlight and (get_game_mode bwand bwnot(COMBAT bwor PCOMBAT)) then begin
call ToggleHighlight(false);
end
end
@@ -179,7 +179,7 @@ procedure start begin
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMoveHandler);
set_global_script_type(1);
end else begin
if isHighlight and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
if isHighlight and not(get_game_mode bwand bwnot(COMBAT bwor PCOMBAT)) then begin
call ToggleHighlight(true);
end
end