<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hl2h/src/modules.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>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>Fix No spread on the hl2_complete server build</title>
<updated>2026-11-04T12:19:50Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T12:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=6a7e0b3bae04a5a4667267b6a45baddeb66fc570'/>
<id>urn:sha1:6a7e0b3bae04a5a4667267b6a45baddeb66fc570</id>
<content type='text'>
The server RandomSeed GOT slot was hardcoded to 0xce1348, measured on the
older bin/server.so. The anniversary branch loads hl2_complete/bin/server.so,
whose R_386_JMP_SLOT for RandomSeed is 0xce5348, so the patch hit unrelated
writable data and no spread silently did nothing.

- Read the relocation from the loaded module's ELF (module_jump_slot) instead
  of hardcoding, with the two known offsets as fallback.
- Override whenever the RandomSeed caller's `this` is the local server player
  (CBaseEntity::FireBullets) instead of matching a hardcoded return-address
  range that also moved between builds.
- m_takedamage is a char (FIELD_CHARACTER) in the 2013 SDK; resolve it as such
  and read a byte, so the IMMUNE damage tag actually works.
</content>
</entry>
<entry>
<title>ESP working: NPC detection + authoritative server-side health</title>
<updated>2026-10-26T14:33:02Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-10-26T14:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=d7edcc9d9e3d90e1c53885870461e046389dee96'/>
<id>urn:sha1:d7edcc9d9e3d90e1c53885870461e046389dee96</id>
<content type='text'>
- entitylist slot 6 (GetHighestEntityIndex); class name via
  GetClientNetworkable -&gt; GetClientClass (replaces the unsafe slot-2 call)
- HL2 SP NPCs: class CAI_BaseNPC + m_lifeState, since NPC m_iHealth is not
  networked; model names from VModelInfoClient006 for labels/friend-foe
- real HP/HP-max from the listen-server entity (IVEngineServer021 -&gt;
  PEntityOfEntIndex -&gt; edict-&gt;m_pUnk -&gt; GetBaseEntity) using offsets scanned
  from server.so's datamap; validated against the client model index
- world_to_screen via IVDebugOverlay003::ScreenPosition (fixes box drift)
- maxs sanity clamp, NPC-only debug logging, neutral colour for wildlife
- build.sh: restore -o libhl2hake.so and add server.cpp
</content>
</entry>
<entry>
<title>init</title>
<updated>2026-08-30T01:32:59Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-30T01:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=aa096fe6886681d3338573cd3af779b57a5b56ab'/>
<id>urn:sha1:aa096fe6886681d3338573cd3af779b57a5b56ab</id>
<content type='text'>
</content>
</entry>
</feed>
