Fixed AP cost display on game load when using CALCAPCOST hook

(ref. fallout2-ce/fallout2-ce#376)
This commit is contained in:
NovaRain
2026-04-16 10:29:46 +08:00
parent 68d721773e
commit 490934bb3c
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -139,6 +139,7 @@ WRAP_WATCOM_FUNC2(long, intface_get_attack, DWORD*, hitMode, DWORD*, isSecondary
WRAP_WATCOM_FUNC0(long, intface_is_item_right_hand)
WRAP_WATCOM_FUNC0(long, intface_is_hidden)
WRAP_WATCOM_FUNC0(void, intface_redraw) // Redraws the main game interface windows (useful after changing some data like active hand, etc.)
WRAP_WATCOM_FUNC0(void, intface_redraw_items) // Redraws only the active item button and ammo bar
WRAP_WATCOM_FUNC0(void, intface_toggle_item_state)
WRAP_WATCOM_FUNC1(void, intface_update_ac, long, animate)
WRAP_WATCOM_FUNC2(void, intface_update_move_points, long, ap, long, freeAP)
+2
View File
@@ -524,6 +524,8 @@ static void InitGlobalScripts() {
HookScripts::InitHookScripts();
LoadGlobalScriptsList();
// Display the correct AP cost from the HOOK_CALCAPCOST hook for the current active item
fo::func::intface_redraw_items();
// Fix map lighting from Night Vision perk when loading a saved game
fo::func::light_set_ambient(fo::var::ambient_light, 1); // refresh map lighting