Skip to content

Commit

Permalink
Mismo fix pero para RemoveAmmo
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeperezz16 committed Jan 5, 2024
1 parent ec63dcf commit f677567
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion regamedll/dlls/weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f677567

Please sign in to comment.