<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hl2h/src/gui.cpp, branch master</title>
<subtitle>Simple internal C++ cheat for HL2 for GNU/Linux.
</subtitle>
<id>https://git.2137697.xyz/hl2h/atom?h=master</id>
<link rel='self' href='https://git.2137697.xyz/hl2h/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/'/>
<updated>2026-11-06T15:09:55Z</updated>
<entry>
<title>Fix audit findings: crash safety, correctness, rendering, performance</title>
<updated>2026-11-06T15:09:55Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-06T15:09:55Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=33f5ed9ef58f26c6b3b52cf605dd4311d658a60d'/>
<id>urn:sha1:33f5ed9ef58f26c6b3b52cf605dd4311d658a60d</id>
<content type='text'>
Crash/UB:
- gate every hook behind an init-stage flag until config/surface/input are ready
- publish module maps as immutable atomic snapshots instead of reallocating
  shared vectors under unlocked readers
- validate the %ebp walk in the RandomSeed/RandomFloat hooks against the stack
- bounds-check every RecvTable/RecvProp/string dereference with module_range()
- preserve the Itanium vtable header when cloning (client, CInput, model render,
  studio render)
- reject negative usercmd sequence numbers; guard config_load against a null
  section target; cap the bone parent walk; check mprotect; drop PROT_EXEC on
  the GOT patch; absorb server.so .bss tail

Correctness:
- filter dormant entities across ESP, aimbot, triggerbot, melee, items and
  projectiles (slot self-tested against the local player)
- reset the server-health latch per map and only latch on valid model indices
- bone cache sized for the 128-target scan; set valid=false on every failure;
  head_position keeps searching past an invalid bone
- vischeck steps past glass by probing until clear, and ignores entities owned
  by the target (held weapons, bone followers)
- aimbot: maxs no longer disables it, AABB-aware FOV prefilter, lock hysteresis,
  lead point re-checked for FOV and visibility
- spread: seed hook arms on the no-spread toggle alone; engine toggle only
  controls the RandomFloat zeroing
- resolve m_hOwnerEntity/m_hOwner; NPC lead velocity from the server entity
- vector_angles pitch range, point_ground normal test, underwater jump+duck no
  longer skips combat, semi-auto press/release edge for synthetic fire
- item/projectile markers and blast rings refresh origin per frame while
  discovery stays at 10 Hz; trajectory uses the real m_DmgRadius and honours
  the blast-radius toggle

Rendering/GUI:
- one overlay draw per engine frame (FRAME_RENDER_START boundary), fixing
  alpha stacking and the speed-graph flicker
- clipped lines/outlines and ellipsised text instead of drawing past the
  content pane or shifting over neighbours
- dropdown dismissal consumes the click; hover ignores hidden controls
- chams: reset AlphaModulate, reference shared materials once, restore prop
  tint colour; fonts created once per handle
- projection uses Source's 4:3 aspect scaling and roll; screen size refreshed
  each frame; FOV circle gated on the aim toggles, not the bind

Performance:
- TTL caches for NPC relation, friendly/neutral and damage class
- model names memoised per model index
- entity pointer -&gt; index cache for the triggerbot (was a 4096-slot walk/tick)

Build:
- real Makefile with -MMD dependency tracking, debug/release objects and an
  always-relink rule; build.sh kept as a thin wrapper
</content>
</entry>
<entry>
<title>Add grenade trajectory, RPG armour priority, empty chargers, mega gravity gun</title>
<updated>2026-11-04T22:26:53Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T22:26:53Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=074e315c8550712dce0c7b530a90eee6aca29e63'/>
<id>urn:sha1:074e315c8550712dce0c7b530a90eee6aca29e63</id>
<content type='text'>
- Projectiles gets a "Grenade trajectory" toggle. While a frag grenade is
  held, simulate the weapon_frag throw (1200 u/s forward + 120 z, player
  velocity, gravity 600) and trace each step with a new
  trace_solid_segment(); reflect on impact, stop on a slow upward-normal hit,
  and draw the path, landing cross and a 300-unit blast ring. Verified on :99
  (arcs, bounces off the tunnel wall, lands).
- With the RPG equipped, armoured NPCs (striders, gunships, dropships,
  hunter-choppers) sort before normal enemies during target acquisition.
  Added helicopter/chopper to the ARMORED model list.
- Empty health/suit chargers are hidden: read m_iJuice from the server
  datamap (0 = depleted, -1 = unreadable/fail open).
- The citadel supercharged gravity gun (d3_citadel_03, d3_citadel_04,
  d3_breen_01 via IVEngineClient::GetLevelName) is treated as a normal
  weapon, so the melee aimbot no longer restricts it to VULNERABLE NPCs.
</content>
</entry>
<entry>
<title>Chams: working alpha via RenderView blend and a custom VMT</title>
<updated>2026-11-04T21:09:14Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T21:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=0cbcbfc14997eff39e0c76acf30c48b851ed1f62'/>
<id>urn:sha1:0cbcbfc14997eff39e0c76acf30c48b851ed1f62</id>
<content type='text'>
Testing on :99 showed the material $alpha path is a dead end: UnlitGeneric
takes translucency from the base texture/vertex alpha, and the debug materials
have neither. Follow Amalgam: apply alpha with IVRenderView::SetBlend
(VEngineRenderView014 slot 4) around the model draw, saving/restoring it.

To have something translucent to blend, write a tiny UnlitGeneric VMT with
$model 1 + $translucent 1 + a white base texture to
&lt;game&gt;/&lt;mod&gt;/materials/hl2hake/translucent.vmt (plus a custom/ copy). It is
written by a preload constructor so it exists before the material system scans
its search paths, then loaded once with FindMaterial. Styles 0/3/4/6 use it
when the colour alpha is below 255.

Also:
- Visible wireframe + through-wall: fill the visible silhouette first so the
  through-wall pass cannot show in the wireframe gaps, then draw a brightened
  contour. Style 6 is now "Solid + contour" (recolour + visible edges).
- find_modules builds local snapshots and publishes them under a mutex; the
  setup thread and the server retry could reset the shared vectors live and
  crash at startup.

Verified on :99: Solid + alpha 64 renders a see-through viewmodel, Solid +
contour shows a blue fill with bright blue contours, Additive is a translucent
coloured glow and Fullbright is a white additive glow.
</content>
</entry>
<entry>
<title>Chams: per-colour alpha and a softer viewmodel additive base</title>
<updated>2026-11-04T18:36:24Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T18:36:24Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=b661a8dfd2c02bea54d8581ebb35d0fb3267867c'/>
<id>urn:sha1:b661a8dfd2c02bea54d8581ebb35d0fb3267867c</id>
<content type='text'>
- Colour picker gains an optional alpha bar (checkerboard preview, #RRGGBBAA
  readout); add_color_alpha is used for the chams colours. Chams colours are
  now r,g,b,a and chams_apply sets $alpha plus MATERIAL_VAR_TRANSLUCENT when
  alpha &lt; 255. Config stores vis_a / inv_a / vm a.
- The additive viewmodel base is now a faint translucent tint (alpha/8)
  instead of an opaque fill, so additive/Fullbright stay see-through and the
  viewmodel no longer becomes a solid blob. Fullbright whitening reduced to
  25% so blue stays blue instead of turning lavender.
</content>
</entry>
<entry>
<title>Chams: per-relationship, visible/invisible styles and viewmodel</title>
<updated>2026-11-04T17:58:13Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T17:58:13Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=5ddc9eb9d02ddc84e4c3a45bdcb2941513fb0346'/>
<id>urn:sha1:5ddc9eb9d02ddc84e4c3a45bdcb2941513fb0346</id>
<content type='text'>
- Hostile/neutral/friendly each have independent visible and through-wall
  settings: enable, style and colour. Viewmodel has its own enable/style/colour.
- Styles: Flat, Wireframe, Additive, Solid, White, Fullbright, Glow outline.
  Additive uses the model solid material + ADDITIVE flag (the VGUI additive
  was invisible on NPCs). White/fullbright are solid-based, so the viewmodel
  no longer disappears/checkerboards. Glow outline adds a wireframe contour
  pass for depth.
- Config: [chams] active/bind, [chams_hostile|neutral|friendly] vis/inv
  settings, [chams_vm]. GUI sections for each group.
</content>
</entry>
<entry>
<title>Chams: model-safe styles and a dedicated viewmodel material</title>
<updated>2026-11-04T17:17:55Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T17:17:55Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=892329ec78acf4d4d63749e8c248227aabc2aded'/>
<id>urn:sha1:892329ec78acf4d4d63749e8c248227aabc2aded</id>
<content type='text'>
VGUI/white materials do not draw skinned models, so every viewmodel style
except the model debug one made the hands/weapon disappear. Use model debug
materials for all styles: wireframe, additive vertex colour, translucent
single colour, translucent vertex colour, MRM fullbright. The viewmodel
always uses debug/debugtranslucentsinglecolor. A missing style now falls back
to that material instead of vgui/white.
</content>
</entry>
<entry>
<title>Chams: exact material styles, GUI dropdown, viewmodel hookup</title>
<updated>2026-11-04T17:15:18Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T17:15:18Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=83b36aaaf146325af2d93dfbaf21eccba91a5d74'/>
<id>urn:sha1:83b36aaaf146325af2d93dfbaf21eccba91a5d74</id>
<content type='text'>
- world_find_material now tries the exact requested style first (resident,
  then FindMaterial) before falling back to debugwhite/vgui white. The old
  candidate scan returned vgui/white for every style, so all materials looked
  flat.
- Add a real CK_DROPDOWN control (overlay list, outside-click close, config
  save) and use it for the Chams material selector.
- Chams viewmodel toggle included in config/UI.
</content>
</entry>
<entry>
<title>Chams: material styles and viewmodel support</title>
<updated>2026-11-04T17:08:07Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T17:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=b3003583a1a66f5ae2eae63763f285635b43d58f'/>
<id>urn:sha1:b3003583a1a66f5ae2eae63763f285635b43d58f</id>
<content type='text'>
- Material selector 0..4: debugwhite, debug wireframe (ignorez), vgui
  white_additive, debugtranslucentsinglecolor, vgui/white; cached per index
  with a debugwhite fallback.
- Add "Viewmodel (hands/weapon)" toggle; viewmodel entities (class contains
  viewmodel or model path /v_...) get a normal-depth chams pass.
- [chams] gains viewmodel= and material=.
</content>
</entry>
<entry>
<title>Add chams</title>
<updated>2026-11-04T16:51:20Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T16:51:20Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=49df428d95a7c443d418d5b7e2a93af599b54f76'/>
<id>urn:sha1:49df428d95a7c443d418d5b7e2a93af599b54f76</id>
<content type='text'>
- Hook IVModelRender::DrawModelExecute (VEngineModel016 slot 19) and force
  models/debug/debugwhite for NPC models, identified by
  ModelRenderInfo_t::entity_index.
- Two passes: MATERIAL_VAR_IGNOREZ through walls, then normal depth, with
  IMaterial::ColorModulate for the configured colour; restore the shared
  material's flag/colour afterwards.
- Material lookup via the IMaterialSystem list, FindMaterial fallback.
- New Chams feature/card with Through walls and colour; [chams] config.
- Remove the temporary ammo/projectile/fuse diagnostics.
</content>
</entry>
<entry>
<title>Add usable item filter, projectile ESP and gravity-gun melee</title>
<updated>2026-11-04T13:28:21Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T13:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=714262bcf759a238daf906de16e7b204712a104f'/>
<id>urn:sha1:714262bcf759a238daf906de16e7b204712a104f</id>
<content type='text'>
- Items: "Only if usable" hides health tags at full health and armor at full
  suit. Health ceiling is the server player's m_iMaxHealth; armor uses the
  server m_ArmorValue against HL2's 100 cap. Fails open when unreadable.
- Projectiles: new Visuals feature/card for thrown grenades, RPG rockets,
  helicopter bombs and AR2 balls. Fuse from server m_flDetonateTime vs engine
  time; radius from m_DmgRadius with per-type fallback; optional 24-segment
  radius ring and FRAG timer label.
- Melee: the killbot now handles the gravity gun as well; only VULNERABLE
  targets, 1200-unit range, primary attack to launch the held object, and no
  aim-punch compensation because the launch uses EyeVectors.
- Server/netvars: m_ArmorValue, m_flDetonateTime, m_DmgRadius.
</content>
</entry>
</feed>
