summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 17:25:31 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 17:25:31 +0100
commit710e8cc59557bc95ed74af8726ea13012fde50c3 (patch)
treef1fd242c12d2ce5a939fbf1d3828e3546bc8f1cf /src/hl2h.h
parentNetvars: catch array element props and log the walk (diff)
downloadhl2h-710e8cc59557bc95ed74af8726ea13012fde50c3.tar.gz
hl2h-710e8cc59557bc95ed74af8726ea13012fde50c3.zip
Items: read ammo and inventory from the server arrays
The client m_iAmmo/m_hMyWeapons recv props still do not resolve, but the listen server has the same CBaseCombatCharacter arrays in its datamap. Resolve m_iAmmo and m_hMyWeapons there: - reserve ammo comes from server_player_ammo() when the client array is missing, so full-ammo filtering works (RPG rockets at 3); - the owned-weapon mask is filled from the server m_hMyWeapons[48] handles, so fallen weapons count as ammo before the player equips them. Widen the datamap field-size filter to 512 for the 192-byte handle array.
Diffstat (limited to 'src/hl2h.h')
-rw-r--r--src/hl2h.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hl2h.h b/src/hl2h.h
index 4f3552e..d8927c7 100644
--- a/src/hl2h.h
+++ b/src/hl2h.h
@@ -297,6 +297,8 @@ bool server_npc_has_follow_target(int idx);
297int server_npc_state(int idx); 297int server_npc_state(int idx);
298int server_npc_takedamage(int idx); 298int server_npc_takedamage(int idx);
299int server_player_armor(int idx); 299int server_player_armor(int idx);
300int server_player_ammo(int idx, int type);
301uint32_t server_player_weapon(int idx, int slot);
300float server_grenade_detonate(int idx); 302float server_grenade_detonate(int idx);
301float server_grenade_radius(int idx); 303float server_grenade_radius(int idx);
302int server_entity_count(); 304int server_entity_count();