- added MSTimef script function

This also deprecates MSTime due to value range / overflow issues.
This commit is contained in:
Christoph Oelckers 2022-04-29 00:47:06 +02:00
parent c855ed90ea
commit bd885977e8
2 changed files with 7 additions and 1 deletions

View File

@ -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();

View File

@ -587,7 +587,8 @@ class Object native
private native static Class<Object> BuiltinNameToClass(Name nm, Class<Object> filter);
private native static Object BuiltinClassCast(Object inptr, Class<Object> 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();