From bc8dbf056c2c33265ce189849c5e33f9d78d9515 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Mon, 16 May 2016 20:07:27 +0600 Subject: [PATCH] Changes In GiveNamedItem: force remove the item if not touches. --- regamedll/dlls/player.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 22ae674e..c82fff9d 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -2139,7 +2139,6 @@ void CBasePlayer::__API_VHOOK(Killed)(entvars_t *pevAttacker, int iGib) { m_bHasDefuser = false; pev->body = 0; - GiveNamedItem("item_thighpack"); MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, NULL, pev); @@ -5794,6 +5793,14 @@ void CBasePlayer::__API_HOOK(GiveNamedItem)(const char *pszName) DispatchSpawn(pent); DispatchTouch(pent, ENT(pev)); + +#ifdef REGAMEDLL_FIXES + // not allow the item to fall to the ground. + if (FNullEnt(pent->v.owner)) + { + pent->v.flags |= FL_KILLME; + } +#endif } CBaseEntity *FindEntityForward(CBaseEntity *pMe)