diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 17:51:20 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 17:51:20 +0100 |
| commit | 49df428d95a7c443d418d5b7e2a93af599b54f76 (patch) | |
| tree | 604e64048aacc5e2b86f441e03e5e5ab8600bef2 /CONTEXT.md | |
| parent | Items: skip the CNetworkArray length header for m_iAmmo/m_hMyWeapons (diff) | |
| download | hl2h-49df428d95a7c443d418d5b7e2a93af599b54f76.tar.gz hl2h-49df428d95a7c443d418d5b7e2a93af599b54f76.zip | |
Add chams
- 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.
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 19 |
1 files changed, 19 insertions, 0 deletions
| @@ -278,6 +278,25 @@ vocabulary / decisions. | |||
| 278 | visible corner. Each edge is clipped at the camera near plane and then to the | 278 | visible corner. Each edge is clipped at the camera near plane and then to the |
| 279 | screen, so a box straddling the camera still draws its visible portions. | 279 | screen, so a box straddling the camera still draws its visible portions. |
| 280 | 280 | ||
| 281 | ## Chams | ||
| 282 | |||
| 283 | - Hooks `IVModelRender::DrawModelExecute` (slot 19 in `VEngineModel016`). | ||
| 284 | The model's entity is `ModelRenderInfo_t::entity_index` (32-bit offset 0x30); | ||
| 285 | only entities for which `esp_is_npc_index` says the client class is an NPC | ||
| 286 | are affected. | ||
| 287 | - Uses `IVModelRender::ForcedMaterialOverride` (slot 1) with | ||
| 288 | `models/debug/debugwhite` and draws twice: first with | ||
| 289 | `MATERIAL_VAR_IGNOREZ` (1 << 15) set through `IMaterial::SetMaterialVarFlag` | ||
| 290 | (slot 29) for the through-wall pass, then without it. `IMaterial:: | ||
| 291 | ColorModulate` (slot 28) applies the configured colour. The shared material's | ||
| 292 | flag and colour are restored to (false, white) after the draw. | ||
| 293 | - Material lookup walks the `IMaterialSystem` list (`world_find_material`), with | ||
| 294 | `FindMaterial` (slot 71) as the fallback for a not-yet-resident material. | ||
| 295 | - Feature is off by default; `[chams] active/bind/walls/r/g/b`, with a | ||
| 296 | "Through walls" toggle and colour picker in the Visuals card. | ||
| 297 | - This is a flat material override, not stencil outlines; depth handling is | ||
| 298 | the simple ignorez/normal two-pass. | ||
| 299 | |||
| 281 | ## Bones / ESP | 300 | ## Bones / ESP |
| 282 | 301 | ||
| 283 | - `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via | 302 | - `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via |
