diff --git a/src/common/objects/dobject.cpp b/src/common/objects/dobject.cpp index 2ed8279da..9f9de3695 100644 --- a/src/common/objects/dobject.cpp +++ b/src/common/objects/dobject.cpp @@ -493,6 +493,11 @@ DEFINE_ACTION_FUNCTION(DObject, MSTime) ACTION_RETURN_INT((uint32_t)I_msTime()); } +DEFINE_ACTION_FUNCTION_NATIVE(DObject, MSTimef, I_msTimeF) +{ + ACTION_RETURN_INT((double)I_msTimeF()); +} + void *DObject::ScriptVar(FName field, PType *type) { auto cls = GetClass(); diff --git a/wadsrc/static/zscript/engine/base.zs b/wadsrc/static/zscript/engine/base.zs index 8c7e54368..58f510c4e 100644 --- a/wadsrc/static/zscript/engine/base.zs +++ b/wadsrc/static/zscript/engine/base.zs @@ -587,7 +587,8 @@ class Object native private native static Class BuiltinNameToClass(Name nm, Class filter); private native static Object BuiltinClassCast(Object inptr, Class test); - native static uint MSTime(); + deprecated("4.8", "Use MSTimeF instead") native static uint MSTime(); + native static double MSTimeF(); native vararg static void ThrowAbortException(String fmt, ...); native virtualscope void Destroy();