From 49df428d95a7c443d418d5b7e2a93af599b54f76 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 17:51:20 +0100 Subject: 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. --- src/netvars.cpp | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'src/netvars.cpp') diff --git a/src/netvars.cpp b/src/netvars.cpp index 6a34ee5..e22ff38 100644 --- a/src/netvars.cpp +++ b/src/netvars.cpp @@ -61,15 +61,8 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) { uintptr_t ptable = *(uintptr_t *)(prop + 0x28); char pname2[64]; - if (!module_string(pname, pname2, sizeof(pname2))) { - static int bad_names = 0; - if (bad_names < 8) { - bad_names++; - logf("netvar: unreadable prop name %#lx in %s", (unsigned long)pname, - tname); - } + if (!module_string(pname, pname2, sizeof(pname2))) continue; - } if (dump) logd(" [%s] %s type=%d off=%d(0x%x) table=%s array=%s", tname, pname2, @@ -90,13 +83,6 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) { g_net.my_weapons = off; logf("netvar: m_hMyWeapons prop=%s poff=%d elem=%p -> %d", pname2, poff, (void *)elem, off); - } else { - static int bad = 0; - if (bad < 8) { - bad++; - logf("netvar: m_hMyWeapons prop=%s rejected poff=%d elem=%p off=%d", - pname2, poff, (void *)elem, off); - } } continue; } @@ -112,13 +98,6 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) { g_net.ammo = off; logf("netvar: m_iAmmo prop=%s poff=%d elem=%p -> %d", pname2, poff, (void *)elem, off); - } else { - static int bad = 0; - if (bad < 8) { - bad++; - logf("netvar: m_iAmmo prop=%s rejected poff=%d elem=%p off=%d", - pname2, poff, (void *)elem, off); - } } continue; } @@ -126,14 +105,6 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) { collect_netvars(ptable, base_off + (uint32_t)poff, depth + 1); continue; } - if (parray) { - static int alogs = 0; - if (alogs < 16) { - alogs++; - logf("netvar array %s poff=%d eoff=%d base=%d", pname2, poff, - *(int32_t *)(parray + 0x2C), (int)base_off); - } - } if (strcmp(pname2, "m_lifeState") == 0 && g_net.lifestate < 0) { g_net.lifestate = (int)(base_off + (uint32_t)poff); -- cgit v1.2.3