<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hl2h/src/studio.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:19:25Z</updated>
<entry>
<title>Hooks: central vtable install with restore support</title>
<updated>2026-11-06T15:19:25Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-06T15:19:25Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=9f0724dcd25a06c5674d30d045dc485a341253b1'/>
<id>urn:sha1:9f0724dcd25a06c5674d30d045dc485a341253b1</id>
<content type='text'>
Move vtable patching into hooks.cpp: one call clones the table, validates every
slot, records the originals and installs the clone. Installs happen from the
setup, game and paint threads, so the bookkeeping is mutex-protected.

Client, CInput, IVModelRender, IStudioRender and ISurface all use it, and
hooks_restore_all() can now put every interface back (previously impossible).
</content>
</entry>
<entry>
<title>Chams: leave engine-forced material passes alone</title>
<updated>2026-11-06T15:17:02Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-06T15:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=8a5efe20e6e077e10592aa427d704836d2a08dd1'/>
<id>urn:sha1:8a5efe20e6e077e10592aa427d704836d2a08dd1</id>
<content type='text'>
Shadow-depth and reflection passes call DrawModelExecute with a material
already forced via IVModelRender::ForcedMaterialOverride. Chams could not tell
that apart from a free draw, substituted its own material (putting chams into
the shadow map) and then cleared the override to null, which broke the shadow
material for every model drawn afterwards.

Hook slot 1 as a tracker so the current forced material is known, and skip the
chams substitution whenever one is active.
</content>
</entry>
<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>Chams: real additive material, addref cached materials</title>
<updated>2026-11-04T20:35:44Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T20:35:44Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=c35fc21f345ac9ecf9017115c4481a1147d05206'/>
<id>urn:sha1:c35fc21f345ac9ecf9017115c4481a1147d05206</id>
<content type='text'>
Testing on :99 showed ADDITIVE on debugtranslucentsinglecolor did nothing and
alpha lost the colour, because that VMT has no $translucent and the engine
bound an unreferenced material. Use debug/debugtranslucentmodelhulls (VMT has
$additive 1 + $color) for Additive/Fullbright, and addref every preloaded
material so the engine stops warning "bad reference count 0" and applies
$color/ColorModulate. Verified: Solid is flat blue, Additive is a translucent
coloured glow, Fullbright is a white additive glow, White is opaque white.

Also drop the viewmodel additive base (the solid material is opaque, so it
made an opaque blob) and never call FindMaterial inside DrawModelExecute.
Document that the alpha control is stored but has no effect until a custom
$translucent model VMT is added.
</content>
</entry>
<entry>
<title>Chams: make Fullbright a white-hot additive glow</title>
<updated>2026-11-04T18:39:27Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T18:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=86093c9052db0aec19f9d993dc59dc5259d085bb'/>
<id>urn:sha1:86093c9052db0aec19f9d993dc59dc5259d085bb</id>
<content type='text'>
Fullbright was additive with the chosen colour lifted only 25% toward white,
which on a dark scene looked almost identical to Solid/Flat. Force white for
the Fullbright colour so the additive pass reads as a distinctly brighter,
white-hot glow; the faint translucent base still gives it a silhouette on
bright backgrounds.
</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: keep additive viewmodel visible on bright backgrounds</title>
<updated>2026-11-04T18:17:12Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T18:17:12Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=ea4b9d1f6de4c0c781a48999e793a5bf976c2b38'/>
<id>urn:sha1:ea4b9d1f6de4c0c781a48999e793a5bf976c2b38</id>
<content type='text'>
Viewmodels are collated as RENDER_GROUP_VIEW_MODEL_OPAQUE, so an additive
forced material can vanish against a bright sky/wall (additive adds nothing to
an already-bright surface). Draw a dim opaque solid base before the additive
viewmodel pass so the first-person model always has a visible silhouette; the
additive layer still provides the glow.
</content>
</entry>
<entry>
<title>Chams: use the model solid shader for flat, drop vgui/white</title>
<updated>2026-11-04T18:09:31Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T18:09:31Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=c15a74d39f87c73a35ca420450e2876db2c37deb'/>
<id>urn:sha1:c15a74d39f87c73a35ca420450e2876db2c37deb</id>
<content type='text'>
vgui/white is an UnlitGeneric with $vertexcolor/$vertexalpha, no basetexture
and no $model, so it renders nothing on model vertices; Flat was invisible on
the viewmodel and would be invisible on NPCs too. Flat now uses the solid
model shader with the FLAT flag. Remove the vgui/white probe.
</content>
</entry>
<entry>
<title>Chams: fix the flat viewmodel, glow outline and fullbright styles</title>
<updated>2026-11-04T18:06:06Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T18:06:06Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=f67ee1ef7e3eff3cd746fc97be98195e68c1368d'/>
<id>urn:sha1:f67ee1ef7e3eff3cd746fc97be98195e68c1368d</id>
<content type='text'>
- Flat uses the solid model shader with the FLAT flag on the viewmodel;
  vgui/white does not draw skinned models and made the hands vanish.
- Glow outline draws its wireframe contour with ZNEARER and a brightened
  colour, so the solid base no longer hides the contour.
- Fullbright is now additive + self-illuminated with the colour lifted toward
  white, so it reads differently from Solid and Additive glow.
</content>
</entry>
</feed>
