diff --git a/OpenRA.Mods.Common/Scripting/Global/UtilsGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/UtilsGlobal.cs index c5aba7459b..a7c4c55016 100644 --- a/OpenRA.Mods.Common/Scripting/Global/UtilsGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/UtilsGlobal.cs @@ -19,12 +19,8 @@ namespace OpenRA.Mods.Common.Scripting [ScriptGlobal("Utils")] public class UtilsGlobal : ScriptGlobal { - readonly World world; public UtilsGlobal(ScriptContext context) - : base(context) - { - world = context.World; - } + : base(context) { } [Desc("Calls a function on every element in a collection.")] public void Do(LuaValue[] collection, LuaFunction func) @@ -106,7 +102,7 @@ namespace OpenRA.Mods.Common.Scripting [Desc("Returns the ticks formatted to HH:MM:SS.")] public string FormatTime(int ticks, bool leadingMinuteZero = true) { - return WidgetUtils.FormatTime(ticks, leadingMinuteZero, world.Timestep); + return WidgetUtils.FormatTime(ticks, leadingMinuteZero, 40); } } }