<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hl2h/CONTEXT.md, 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-05T19:32:59Z</updated>
<entry>
<title>Items: server ammo counts and frag-grenade type</title>
<updated>2026-11-05T19:32:59Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-05T19:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=57b53d579f32f094c1cdefad62a6224baf270e0d'/>
<id>urn:sha1:57b53d579f32f094c1cdefad62a6224baf270e0d</id>
<content type='text'>
- local_ammo now prefers the authoritative server m_iAmmo array (header skip)
  and only falls back to the client netvar array. The client offset can be off
  by an element, which made "full" checks flicker as other ammo was spent.
- Frag grenade pickups were falling through to a generic "Ammo" label with
  ammo_type=-1, so the usable filter never ran. w_grenade/w_frag/
  items/grenade/frag_grenade are now "Frag grenade" and map to m_iAmmo[11]
  (sk_max_grenade, stock 5); AR2/SMG1 grenade variants map to m_iAmmo[8].
</content>
</entry>
<entry>
<title>Items: keep health chargers visible, add charger diagnostics</title>
<updated>2026-11-05T17:09:43Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-05T17:09:43Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=a5d732920bd56c96e85db1ce2073bebf53e6b1ea'/>
<id>urn:sha1:a5d732920bd56c96e85db1ce2073bebf53e6b1ea</id>
<content type='text'>
The health charger's candidate m_iJuice offset (0x3c8) read 0 on a full
charger, so the empty-hide made health chargers disappear entirely. Restrict
the hide to suit chargers (verified 0x47c) until the health offset is
confirmed; health chargers stay visible.

Classify with the server class name when the client class is generic, accept
`healthcharger` in the health branch (maps use item_healthcharger /
CNewWallHealth, not the func_healthcharger brush), and log up to eight
`juice:` lines with the class and both candidate offsets/values.
</content>
</entry>
<entry>
<title>Grenade trajectory: actual grenade state, full-length path, rounder rings</title>
<updated>2026-11-04T22:46:58Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T22:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=a224cc451233a487a3d931954b125f6e1736e710'/>
<id>urn:sha1:a224cc451233a487a3d931954b125f6e1736e710</id>
<content type='text'>
- Prefer the local player's thrown frag over the pre-throw estimate: resolve
  CBaseGrenade::m_hThrower from the server datamap (client owner handles as
  fallback), then seed the prediction from the live origin/velocity. The real
  frag is a spinning VPhysics box with a random Y angular impulse, so bounce
  points remain approximate; the doc now says so.
- Keep 512 path points sampled every other 20 ms step (up to 24 s) instead of
  127 points / ~2.5 s, so the line reaches the landing instead of stopping in
  mid-air.
- Radius rings use 36 segments; a segment whose near-plane-clipped endpoint
  the engine overlay refuses falls back to the local projection, and that
  projection now uses the configured camera FOV instead of a hardcoded 75
  degrees (the wide-FOV ring no longer kinks/drops pieces).
</content>
</entry>
<entry>
<title>Charger juice: resolve per-class offsets</title>
<updated>2026-11-04T22:32:00Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-11-04T22:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/hl2h/commit/?id=80a287910f3f77519c8243ba5f53d9c877fbddcb'/>
<id>urn:sha1:80a287910f3f77519c8243ba5f53d9c877fbddcb</id>
<content type='text'>
CWallHealth derives CBaseToggle and CNewRecharge derives CBaseAnimating, so
m_iJuice is at different offsets (0x3c8 and 0x47c here). Collect every
m_iJuice datamap match, derive the suit offset from m_iMaxJuice-20, and pick
by the server class name. Also detect health brushes via wallhealth/recharge
rather than the ESP label. Verified the offsets resolve distinctly on :99.
</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: 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>
</feed>
