From a96d04ee2fa6fbe0968bac7049c6e8187f853e0e Mon Sep 17 00:00:00 2001 From: Vaqtincha Date: Tue, 24 Oct 2023 02:29:14 +0500 Subject: [PATCH 1/2] Useful for custom ammo types. --- regamedll/dlls/client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index 9460d0b49..648b9c6cc 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -2251,7 +2251,7 @@ bool EXT_FUNC __API_HOOK(BuyGunAmmo)(CBasePlayer *pPlayer, CBasePlayerItem *weap if (pPlayer->m_iAccount >= info->clipCost) { #ifdef REGAMEDLL_FIXES - if (pPlayer->GiveAmmo(info->buyClipSize, info->ammoName2, weapon->iMaxAmmo1()) == -1) + if (pPlayer->GiveAmmo(info->buyClipSize, weapon->pszAmmo1, weapon->iMaxAmmo1()) == -1) return false; EMIT_SOUND(ENT(weapon->pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM); @@ -4813,7 +4813,7 @@ int EXT_FUNC GetWeaponData(edict_t *pEdict, struct weapon_data_s *info) const WeaponInfoStruct *wpnInfo = GetDefaultWeaponInfo(II.iId); if (wpnInfo && wpnInfo->gunClipSize != II.iMaxClip) - item->m_iClip = wpnInfo->gunClipSize; + item->m_iClip = wpnInfo->gunClipSize; } #endif } From ba63322e5b277aaf21b784309dc52bf3732f7a8c Mon Sep 17 00:00:00 2001 From: Vaqtincha Date: Tue, 24 Oct 2023 02:34:39 +0500 Subject: [PATCH 2/2] useful for custom ammo types --- regamedll/dlls/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index 648b9c6cc..56297b358 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -2251,7 +2251,7 @@ bool EXT_FUNC __API_HOOK(BuyGunAmmo)(CBasePlayer *pPlayer, CBasePlayerItem *weap if (pPlayer->m_iAccount >= info->clipCost) { #ifdef REGAMEDLL_FIXES - if (pPlayer->GiveAmmo(info->buyClipSize, weapon->pszAmmo1, weapon->iMaxAmmo1()) == -1) + if (pPlayer->GiveAmmo(info->buyClipSize, weapon->pszAmmo1(), weapon->iMaxAmmo1()) == -1) return false; EMIT_SOUND(ENT(weapon->pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);