summaryrefslogtreecommitdiffstats
path: root/src/hl2h.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 17:51:20 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 17:51:20 +0100
commit49df428d95a7c443d418d5b7e2a93af599b54f76 (patch)
tree604e64048aacc5e2b86f441e03e5e5ab8600bef2 /src/hl2h.cpp
parentItems: skip the CNetworkArray length header for m_iAmmo/m_hMyWeapons (diff)
downloadhl2h-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 '')
-rw-r--r--src/hl2h.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp
index 703a582..067b11f 100644
--- a/src/hl2h.cpp
+++ b/src/hl2h.cpp
@@ -1148,6 +1148,7 @@ static void *setup_thread(void *) {
1148 g_iface.engineserver = ef("VEngineServer021", nullptr); 1148 g_iface.engineserver = ef("VEngineServer021", nullptr);
1149 g_iface.debugoverlay = ef("VDebugOverlay003", nullptr); 1149 g_iface.debugoverlay = ef("VDebugOverlay003", nullptr);
1150 g_iface.enginetrace = ef("EngineTraceClient003", nullptr); 1150 g_iface.enginetrace = ef("EngineTraceClient003", nullptr);
1151 g_iface.modelrender = ef("VEngineModel016", nullptr);
1151 static const char *cvar_names[] = {"VEngineCvar004", "VEngineCvar007", 1152 static const char *cvar_names[] = {"VEngineCvar004", "VEngineCvar007",
1152 "VEngineCvar003", "IVEngineCvar004", 1153 "VEngineCvar003", "IVEngineCvar004",
1153 nullptr}; 1154 nullptr};
@@ -1178,6 +1179,9 @@ static void *setup_thread(void *) {
1178 "enginetrace: %p (EngineTraceClient003)", 1179 "enginetrace: %p (EngineTraceClient003)",
1179 g_iface.engineserver, g_iface.debugoverlay, g_iface.enginetrace); 1180 g_iface.engineserver, g_iface.debugoverlay, g_iface.enginetrace);
1180 logf("cvar: %p (VEngineCvar004)", g_iface.cvar); 1181 logf("cvar: %p (VEngineCvar004)", g_iface.cvar);
1182 logf("modelrender: %p (VEngineModel016)", g_iface.modelrender);
1183
1184 chams_init();
1181 1185
1182 resolve_netvars(); 1186 resolve_netvars();
1183 if (!g_net.ok()) 1187 if (!g_net.ok())