From 16a230827b6bb8bfdaff11f80835b914a5ed63f2 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Sat, 3 Aug 2024 00:25:41 +0300 Subject: [PATCH] `CBasePlayerItem`: check spawnflags on `Materialize()` --- regamedll/dlls/weapons.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index 454b96f04..131dd4dea 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -518,7 +518,11 @@ void CBasePlayerItem::Materialize() UTIL_SetOrigin(pev, pev->origin); SetTouch(&CBasePlayerItem::DefaultTouch); - if (g_pGameRules->IsMultiplayer()) + if (g_pGameRules->IsMultiplayer() +#ifdef REGAMEDLL_FIXES + && g_pGameRules->WeaponShouldRespawn(this) == GR_WEAPON_RESPAWN_NO +#endif + ) { if (!CanDrop()) {