diff --git a/scripting/include/srccoop/classdef.inc b/scripting/include/srccoop/classdef.inc index b78189c2..dda18291 100644 --- a/scripting/include/srccoop/classdef.inc +++ b/scripting/include/srccoop/classdef.inc @@ -1741,9 +1741,7 @@ methodmap CBasePlayer < CBaseCombatCharacter return NULL_CBASEENTITY; } - int iNameOffset = (strncmp(szItemName, "item_weapon_", 12, false) == 0) ? 5 : 0; - - CBaseAnimating pItem = CBaseAnimating(GivePlayerItem(this.GetEntIndex(), szItemName[iNameOffset])); + CBaseAnimating pItem = CBaseAnimating(GivePlayerItem(this.GetEntIndex(), szItemName)); if (pItem.IsValid() && !pItem.GetOwner().IsValid()) { // this would drop on the ground if player cant pick up any more