diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 20:15:51 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 20:15:51 +0100 |
| commit | ba500fef7fbf94725f18541b0e23a45591379dba (patch) | |
| tree | f1eec8ad34e532fb7bcb9172083c78d96bcdca4f /src/netvars.cpp | |
| parent | Overlay: keep GUI and toasts drawing if the ESP font fails (diff) | |
| download | hl2h-ba500fef7fbf94725f18541b0e23a45591379dba.tar.gz hl2h-ba500fef7fbf94725f18541b0e23a45591379dba.zip | |
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.
Diffstat (limited to 'src/netvars.cpp')
| -rw-r--r-- | src/netvars.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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) { | |||
| 92 | } else if (strcmp(pname2, "m_hActiveWeapon") == 0 && | 92 | } else if (strcmp(pname2, "m_hActiveWeapon") == 0 && |
| 93 | g_net.activeweapon < 0) { | 93 | g_net.activeweapon < 0) { |
| 94 | g_net.activeweapon = (int)(base_off + (uint32_t)poff); | 94 | g_net.activeweapon = (int)(base_off + (uint32_t)poff); |
| 95 | } else if (strcmp(pname2, "m_hGroundEntity") == 0 && | ||
| 96 | g_net.groundentity < 0) { | ||
| 97 | g_net.groundentity = (int)(base_off + (uint32_t)poff); | ||
| 95 | } else if (strcmp(pname2, "m_iTeamNum") == 0 && g_net.teamnum < 0) { | 98 | } else if (strcmp(pname2, "m_iTeamNum") == 0 && g_net.teamnum < 0) { |
| 96 | g_net.teamnum = (int)(base_off + (uint32_t)poff); | 99 | g_net.teamnum = (int)(base_off + (uint32_t)poff); |
| 97 | } else if (strcmp(pname2, "m_vecOrigin") == 0 && g_net.origin < 0) { | 100 | } else if (strcmp(pname2, "m_vecOrigin") == 0 && g_net.origin < 0) { |
| @@ -272,7 +275,7 @@ void resolve_netvars() { | |||
| 272 | logf("m_vecAbsVelocity unresolved; jumpbug assist disabled"); | 275 | logf("m_vecAbsVelocity unresolved; jumpbug assist disabled"); |
| 273 | logf("netvars: flags=%d velocity=%d movetype=%d health=%d maxhealth=%d " | 276 | logf("netvars: flags=%d velocity=%d movetype=%d health=%d maxhealth=%d " |
| 274 | "teamnum=%d origin=%d viewoffset=%d mins=%d maxs=%d lifeste=%d " | 277 | "teamnum=%d origin=%d viewoffset=%d mins=%d maxs=%d lifeste=%d " |
| 275 | "modelindex=%d absvelocity=%d activeweapon=%d", | 278 | "modelindex=%d absvelocity=%d activeweapon=%d groundentity=%d", |
| 276 | g_net.flags, g_net.velocity, g_net.movetype, g_net.health, | 279 | g_net.flags, g_net.velocity, g_net.movetype, g_net.health, |
| 277 | g_net.maxhealth, g_net.teamnum, g_net.origin, g_net.viewoffset, | 280 | g_net.maxhealth, g_net.teamnum, g_net.origin, g_net.viewoffset, |
| 278 | g_net.mins, g_net.maxs, g_net.lifestate, g_net.modelindex, | 281 | g_net.mins, g_net.maxs, g_net.lifestate, g_net.modelindex, |
