summaryrefslogtreecommitdiffstats
path: root/src/netvars.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/netvars.cpp31
1 files changed, 1 insertions, 30 deletions
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) {
61 uintptr_t ptable = *(uintptr_t *)(prop + 0x28); 61 uintptr_t ptable = *(uintptr_t *)(prop + 0x28);
62 62
63 char pname2[64]; 63 char pname2[64];
64 if (!module_string(pname, pname2, sizeof(pname2))) { 64 if (!module_string(pname, pname2, sizeof(pname2)))
65 static int bad_names = 0;
66 if (bad_names < 8) {
67 bad_names++;
68 logf("netvar: unreadable prop name %#lx in %s", (unsigned long)pname,
69 tname);
70 }
71 continue; 65 continue;
72 }
73 66
74 if (dump) 67 if (dump)
75 logd(" [%s] %s type=%d off=%d(0x%x) table=%s array=%s", tname, pname2, 68 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) {
90 g_net.my_weapons = off; 83 g_net.my_weapons = off;
91 logf("netvar: m_hMyWeapons prop=%s poff=%d elem=%p -> %d", pname2, 84 logf("netvar: m_hMyWeapons prop=%s poff=%d elem=%p -> %d", pname2,
92 poff, (void *)elem, off); 85 poff, (void *)elem, off);
93 } else {
94 static int bad = 0;
95 if (bad < 8) {
96 bad++;
97 logf("netvar: m_hMyWeapons prop=%s rejected poff=%d elem=%p off=%d",
98 pname2, poff, (void *)elem, off);
99 }
100 } 86 }
101 continue; 87 continue;
102 } 88 }
@@ -112,13 +98,6 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) {
112 g_net.ammo = off; 98 g_net.ammo = off;
113 logf("netvar: m_iAmmo prop=%s poff=%d elem=%p -> %d", pname2, poff, 99 logf("netvar: m_iAmmo prop=%s poff=%d elem=%p -> %d", pname2, poff,
114 (void *)elem, off); 100 (void *)elem, off);
115 } else {
116 static int bad = 0;
117 if (bad < 8) {
118 bad++;
119 logf("netvar: m_iAmmo prop=%s rejected poff=%d elem=%p off=%d",
120 pname2, poff, (void *)elem, off);
121 }
122 } 101 }
123 continue; 102 continue;
124 } 103 }
@@ -126,14 +105,6 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) {
126 collect_netvars(ptable, base_off + (uint32_t)poff, depth + 1); 105 collect_netvars(ptable, base_off + (uint32_t)poff, depth + 1);
127 continue; 106 continue;
128 } 107 }
129 if (parray) {
130 static int alogs = 0;
131 if (alogs < 16) {
132 alogs++;
133 logf("netvar array %s poff=%d eoff=%d base=%d", pname2, poff,
134 *(int32_t *)(parray + 0x2C), (int)base_off);
135 }
136 }
137 108
138 if (strcmp(pname2, "m_lifeState") == 0 && g_net.lifestate < 0) { 109 if (strcmp(pname2, "m_lifeState") == 0 && g_net.lifestate < 0) {
139 g_net.lifestate = (int)(base_off + (uint32_t)poff); 110 g_net.lifestate = (int)(base_off + (uint32_t)poff);