From ba500fef7fbf94725f18541b0e23a45591379dba Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 20:15:51 +0100 Subject: Fix tooltip truncation; add Stucklaunch assist Tooltips: text_in() shifted the x position to fit the full string before truncating, which drew the tooltip text outside its box. Truncate to the available width first, then clamp inside the clip. Stucklaunch (Movement): - opt-in feature (Active off by default) with its own bind; - holds jump, alternates +use every 2 ticks to regrab a physics prop, optionally +attack while the gravity gun is active, and air-strafes; - engagement uses m_hGroundEntity (client netvar) latched for ~0.5 s so the prop stays active while airborne; falls back to running whenever active if the netvar is unavailable, with a startup warning to bind it; - does not spawn or place props; the player supplies the prop and initial speed. Config gets [stucklaunch] active/bind/use_spam/gravspam/autostrafe; Reset restores those defaults. CONTEXT documents the assist and its limits. --- src/netvars.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/netvars.cpp') diff --git a/src/netvars.cpp b/src/netvars.cpp index 3b2d3b8..e304317 100644 --- a/src/netvars.cpp +++ b/src/netvars.cpp @@ -92,6 +92,9 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) { } else if (strcmp(pname2, "m_hActiveWeapon") == 0 && g_net.activeweapon < 0) { g_net.activeweapon = (int)(base_off + (uint32_t)poff); + } else if (strcmp(pname2, "m_hGroundEntity") == 0 && + g_net.groundentity < 0) { + g_net.groundentity = (int)(base_off + (uint32_t)poff); } else if (strcmp(pname2, "m_iTeamNum") == 0 && g_net.teamnum < 0) { g_net.teamnum = (int)(base_off + (uint32_t)poff); } else if (strcmp(pname2, "m_vecOrigin") == 0 && g_net.origin < 0) { @@ -272,7 +275,7 @@ void resolve_netvars() { logf("m_vecAbsVelocity unresolved; jumpbug assist disabled"); logf("netvars: flags=%d velocity=%d movetype=%d health=%d maxhealth=%d " "teamnum=%d origin=%d viewoffset=%d mins=%d maxs=%d lifeste=%d " - "modelindex=%d absvelocity=%d activeweapon=%d", + "modelindex=%d absvelocity=%d activeweapon=%d groundentity=%d", g_net.flags, g_net.velocity, g_net.movetype, g_net.health, g_net.maxhealth, g_net.teamnum, g_net.origin, g_net.viewoffset, g_net.mins, g_net.maxs, g_net.lifestate, g_net.modelindex, -- cgit v1.2.3