mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Fixed ammo (missing sound)
This commit is contained in:
parent
10ee63d807
commit
0fa5e32208
@ -76,6 +76,9 @@ void CBasePlayerAmmo::DefaultTouch(CBaseEntity *pOther)
|
||||
SetTouch(nullptr);
|
||||
SetThink(&CBaseEntity::SUB_Remove);
|
||||
pev->nextthink = gpGlobals->time + 0.1f;
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
pev->owner = ENT(pOther->pev);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (gEvilImpulse101)
|
||||
|
@ -2201,10 +2201,14 @@ 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, info->maxRounds) == -1)
|
||||
if (pPlayer->GiveAmmo(info->buyClipSize, info->ammoName2, weapon->iMaxAmmo1()) == -1)
|
||||
return false;
|
||||
|
||||
EMIT_SOUND(ENT(weapon->pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
||||
#else
|
||||
pPlayer->GiveNamedItem(info->ammoName1);
|
||||
if (!pPlayer->GiveNamedItemEx(info->ammoName1)) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
pPlayer->AddAccount(-info->clipCost, RT_PLAYER_BOUGHT_SOMETHING);
|
||||
|
Loading…
Reference in New Issue
Block a user