mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-14 15:48:01 +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);
|
SetTouch(nullptr);
|
||||||
SetThink(&CBaseEntity::SUB_Remove);
|
SetThink(&CBaseEntity::SUB_Remove);
|
||||||
pev->nextthink = gpGlobals->time + 0.1f;
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
pev->owner = ENT(pOther->pev);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gEvilImpulse101)
|
else if (gEvilImpulse101)
|
||||||
|
@ -2201,10 +2201,14 @@ bool EXT_FUNC __API_HOOK(BuyGunAmmo)(CBasePlayer *pPlayer, CBasePlayerItem *weap
|
|||||||
if (pPlayer->m_iAccount >= info->clipCost)
|
if (pPlayer->m_iAccount >= info->clipCost)
|
||||||
{
|
{
|
||||||
#ifdef REGAMEDLL_FIXES
|
#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;
|
return false;
|
||||||
|
|
||||||
|
EMIT_SOUND(ENT(weapon->pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
||||||
#else
|
#else
|
||||||
pPlayer->GiveNamedItem(info->ammoName1);
|
if (!pPlayer->GiveNamedItemEx(info->ammoName1)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pPlayer->AddAccount(-info->clipCost, RT_PLAYER_BOUGHT_SOMETHING);
|
pPlayer->AddAccount(-info->clipCost, RT_PLAYER_BOUGHT_SOMETHING);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user