Skip to content

Commit

Permalink
CBasePlayerAmmo: check spawnflags on Spawn()
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov committed Aug 2, 2024
1 parent 576e967 commit 670041d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion regamedll/dlls/ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ void CBasePlayerAmmo::Spawn()

SetTouch(&CBasePlayerAmmo::DefaultTouch);

if (g_pGameRules->IsMultiplayer())
if (g_pGameRules->IsMultiplayer()
#ifdef REGAMEDLL_FIXES
&& g_pGameRules->AmmoShouldRespawn(this) == GR_AMMO_RESPAWN_NO
#endif
)
{
SetThink(&CBaseEntity::SUB_Remove);
pev->nextthink = gpGlobals->time + 2.0f;
Expand Down

0 comments on commit 670041d

Please sign in to comment.