diff --git a/_entWatch4/scripting/classes/CItem.inc b/_entWatch4/scripting/classes/CItem.inc index 886c9abb..26dcae80 100644 --- a/_entWatch4/scripting/classes/CItem.inc +++ b/_entWatch4/scripting/classes/CItem.inc @@ -12,7 +12,6 @@ methodmap CItem < Basic myclass.SetHandle("dConfig", value); - myclass.SetInt("iTempID", -1); myclass.SetInt("iClient", INVALID_ENT_REFERENCE); myclass.SetInt("iButton", INVALID_ENT_REFERENCE); myclass.SetInt("iWeapon", INVALID_ENT_REFERENCE); @@ -38,18 +37,6 @@ methodmap CItem < Basic } - property int iTempID - { - public get() - { - return this.GetInt("iTempID"); - } - public set(int value) - { - this.SetInt("iTempID", value); - } - } - property int iClient { public get() diff --git a/_entWatch4/scripting/entWatch-core.sp b/_entWatch4/scripting/entWatch-core.sp index 1fc45de3..df4c44a6 100644 --- a/_entWatch4/scripting/entWatch-core.sp +++ b/_entWatch4/scripting/entWatch-core.sp @@ -283,15 +283,13 @@ stock bool RegisterItemEntity(CItem item, int entity, int type) { int iOwner = Entity_GetOwner(entity); int iParent = Entity_GetParent(entity); - int iTempID = Entity_GetTempID(entity); switch(type) { case REGISTER_WEAPON: { - if (!item.bWeapon && item.iTempID == iTempID && (iOwner == INVALID_ENT_REFERENCE)) + if (!item.bWeapon && (iOwner == INVALID_ENT_REFERENCE)) { - item.iTempID = iTempID; item.iWeapon = entity; return true; @@ -299,11 +297,10 @@ stock bool RegisterItemEntity(CItem item, int entity, int type) } case REGISTER_BUTTON: { - if (!item.bButton && item.iTempID == iTempID && (iParent == INVALID_ENT_REFERENCE || (item.bWeapon && iParent == item.iWeapon))) + if (!item.bButton && (iParent == INVALID_ENT_REFERENCE || (item.bWeapon && iParent == item.iWeapon))) { SDKHook(entity, SDKHook_Use, OnButtonPress); - item.iTempID = iTempID; item.iButton = entity; return true; @@ -311,13 +308,12 @@ stock bool RegisterItemEntity(CItem item, int entity, int type) } case REGISTER_TRIGGER: { - if (!item.bTrigger && item.iTempID == iTempID && (iParent == INVALID_ENT_REFERENCE || (item.bWeapon && iParent == item.iWeapon))) + if (!item.bTrigger && (iParent == INVALID_ENT_REFERENCE || (item.bWeapon && iParent == item.iWeapon))) { SDKHook(entity, SDKHook_StartTouch, OnTriggerTouch); SDKHook(entity, SDKHook_EndTouch, OnTriggerTouch); SDKHook(entity, SDKHook_Touch, OnTriggerTouch); - item.iTempID = iTempID; item.iTrigger = entity; return true; diff --git a/_entWatch4/scripting/include/entWatch_helpers.inc b/_entWatch4/scripting/include/entWatch_helpers.inc index 273a1b24..504ff33a 100644 --- a/_entWatch4/scripting/include/entWatch_helpers.inc +++ b/_entWatch4/scripting/include/entWatch_helpers.inc @@ -116,26 +116,6 @@ stock int Entity_GetParent(int entity) return GetEntPropEnt(entity, Prop_Data, "m_pParent"); } -/** - * Gets the template id of an entity. - * - * @param entity Entity index. - * @return Template ID or -1 - */ -stock int Entity_GetTempID(int entity) -{ - char name[128]; - GetEntPropString(entity, Prop_Data, "m_iName", name, sizeof(name)); - - int index - if ((index = FindCharInString(name, '&', true)) != -1) - { - return view_as(StringToInt(name[index + 1])); - } - - return -1; -} - /** * Sets the Name of an entity. *