From cb47ecad79777eb88e07b7f9a2b443db25f1ee93 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Thu, 25 Jun 2026 23:12:35 +0800 Subject: [PATCH 1/2] fix: nil guard for _custom_player_panel to prevent crash with VanillaHUD Plus --- lua/hud/HudTeammate.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/hud/HudTeammate.lua b/lua/hud/HudTeammate.lua index 771d07a..882f301 100644 --- a/lua/hud/HudTeammate.lua +++ b/lua/hud/HudTeammate.lua @@ -795,6 +795,7 @@ if VoidUI.options.teammate_panels then end end function HUDTeammate:set_detection() + if not self._custom_player_panel then return end local health_panel = self._custom_player_panel:child("health_panel") local detect_value = health_panel:child("detect_value") local downs_value = health_panel:child("downs_value") From a92ac29016dc305d14f5d1147f665c86756189a5 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Fri, 26 Jun 2026 17:51:20 +0800 Subject: [PATCH 2/2] fix: prevent VanillaHUD Plus freeze by un-JITing _truncate_name VanillaHUD Plus HUDTeammate:_truncate_name() shrinks the name font by 0.1 per loop and compares against > 15.1. On our custom teammate panel this loop runs hot at spawn (set_name). Under LuaJIT the float compare diverges from the interpreter so the loop never exits, freezing the game at level load. Force that one function to run interpreted (JIT stays on everywhere else) so it terminates as it does in the interpreter. Co-Authored-By: Claude Opus 4.8 --- lua/hud/HudTeammate.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/hud/HudTeammate.lua b/lua/hud/HudTeammate.lua index 882f301..8126851 100644 --- a/lua/hud/HudTeammate.lua +++ b/lua/hud/HudTeammate.lua @@ -759,6 +759,14 @@ if VoidUI.options.teammate_panels then interact_time:set_bottom(self._custom_player_panel:bottom() - 3) self:create_custom_waiting_panel(teammates_panel) self:set_info_visible() + -- VanillaHUD Plus' HUDTeammate:_truncate_name() shrinks the name font by 0.1 + -- in a loop. On our custom panel that loop is hot at spawn (set_name), and + -- under LuaJIT the float compare diverges from the interpreter so it never + -- exits and the game freezes. Force that one function to run interpreted. + if HUDTeammate._truncate_name and not HUDTeammate._void_truncate_jit_off and jit and jit.off then + HUDTeammate._void_truncate_jit_off = true + pcall(jit.off, HUDTeammate._truncate_name, true) + end end function HUDTeammate:whisper_mode_changed()