diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 17:25:31 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 17:25:31 +0100 |
| commit | 710e8cc59557bc95ed74af8726ea13012fde50c3 (patch) | |
| tree | f1fd242c12d2ce5a939fbf1d3828e3546bc8f1cf /src/hl2h.h | |
| parent | Netvars: catch array element props and log the walk (diff) | |
| download | hl2h-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -297,6 +297,8 @@ bool server_npc_has_follow_target(int idx); | |||
| 297 | int server_npc_state(int idx); | 297 | int server_npc_state(int idx); |
| 298 | int server_npc_takedamage(int idx); | 298 | int server_npc_takedamage(int idx); |
| 299 | int server_player_armor(int idx); | 299 | int server_player_armor(int idx); |
| 300 | int server_player_ammo(int idx, int type); | ||
| 301 | uint32_t server_player_weapon(int idx, int slot); | ||
| 300 | float server_grenade_detonate(int idx); | 302 | float server_grenade_detonate(int idx); |
| 301 | float server_grenade_radius(int idx); | 303 | float server_grenade_radius(int idx); |
| 302 | int server_entity_count(); | 304 | int server_entity_count(); |
