diff --git a/_entWatch4/scripting/classes/CItem.inc b/_entWatch4/scripting/classes/CItem.inc index 4191a159..7c2413e8 100644 --- a/_entWatch4/scripting/classes/CItem.inc +++ b/_entWatch4/scripting/classes/CItem.inc @@ -19,7 +19,8 @@ methodmap CItem < Basic myclass.SetInt("iTimesUsed", 0); myclass.SetInt("iTimeReady", 0); - myclass.SetInt("iWaitTill", 0); + + myclass.SetFloat("flWait", 0.0); return view_as(myclass); } @@ -111,15 +112,15 @@ methodmap CItem < Basic } } - property int iWaitTill + property float flWait { public get() { - return this.GetInt("iWaitTill"); + return this.GetFloat("flWait"); } - public set(int value) + public set(float value) { - this.SetInt("iWaitTill", value); + this.SetFloat("flWait", value); } } diff --git a/_entWatch4/scripting/entWatch-core.sp b/_entWatch4/scripting/entWatch-core.sp index bb517934..63dcff9b 100644 --- a/_entWatch4/scripting/entWatch-core.sp +++ b/_entWatch4/scripting/entWatch-core.sp @@ -536,9 +536,9 @@ public Action OnButtonPress(int button, int client) { if (HasEntProp(button, Prop_Data, "m_flWait")) { - if (item.iWaitTill < RoundToCeil(GetEngineTime())) + if (item.flWait < GetEngineTime()) { - item.iWaitTill = RoundToCeil(GetEngineTime() + GetEntPropFloat(button, Prop_Data, "m_flWait")); + item.flWait = GetEngineTime() + GetEntPropFloat(button, Prop_Data, "m_flWait"); } else return Plugin_Handled; }