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/esp.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/esp.cpp') diff --git a/src/esp.cpp b/src/esp.cpp index 64ee83f..bda6232 100644 --- a/src/esp.cpp +++ b/src/esp.cpp @@ -1131,6 +1131,40 @@ static void spread_compute() { g_spread_ready = true; } +bool entity_is_physics_prop(int idx) { + if (idx <= 0 || idx > 4096) + return false; + void *net = entity_networkable(idx); + const char *cls = net ? entity_class_name(net, nullptr) : nullptr; + void *ent = entitylist_get(idx); + const char *model = ent ? entity_model_name(ent) : nullptr; + if (cls && (strstr(cls, "prop_physics") || strstr(cls, "physbox"))) + return true; + if (model && (strstr(model, "props_junk") || strstr(model, "props_physics"))) + return true; + return false; +} + +bool active_weapon_is_gravity_gun(void *local_ent) { + if (!local_ent || g_net.activeweapon < 0) + return false; + uint32_t h = *(uint32_t *)((uintptr_t)local_ent + g_net.activeweapon); + if (h == 0xFFFFFFFFu) + return false; + int idx = (int)(h & 0xFFFF); + if (idx <= 0 || idx > 4096) + return false; + void *wep = entitylist_get(idx); + void *net = entity_networkable(idx); + const char *cls = net ? entity_class_name(net, nullptr) : nullptr; + const char *model = wep ? entity_model_name(wep) : nullptr; + if (cls && strstr(cls, "physcannon")) + return true; + if (model && (strstr(model, "physcannon") || strstr(model, "w_physics"))) + return true; + return false; +} + static bool active_weapon_is_shotgun(void *local_ent) { if (!local_ent || g_net.activeweapon < 0) return false; -- cgit v1.2.3