From f677567df4c5fe4e8f7e2a002938e40a93077283 Mon Sep 17 00:00:00 2001 From: Alejo Date: Fri, 5 Jan 2024 00:15:37 -0300 Subject: [PATCH] Mismo fix pero para RemoveAmmo --- regamedll/dlls/weapons.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index a053dedad..b43b05473 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -222,7 +222,9 @@ BOOL EXT_FUNC RemoveAmmoNameFromAmmoRegistry(const char *szAmmoname) for (int i = 1; i < MAX_AMMO_SLOTS; i++) { - if (!Q_stricmp(CBasePlayerItem::m_AmmoInfoArray[i].pszName, szAmmoname)) + AmmoInfo& ammoinfo = CBasePlayerItem::m_AmmoInfoArray[i]; + + if (ammoinfo.iId && !Q_stricmp(ammoinfo.pszName, szAmmoname)) { Q_memset(&CBasePlayerItem::m_AmmoInfoArray[i], 0, sizeof(CBasePlayerItem::m_AmmoInfoArray[i])); return TRUE;