mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-23 09:00:19 +02:00
Use an integer when waiting
Since the expected time is in milliseconds, it's best to use an integer instead. Floating-point numbers lose precision as they get larger, especially when the level's current time is long (e.g., over 24 hours). This loss of precision could cause scripts to wait unsuccessfully with small numbers, causing unexpected behaviors
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -2478,7 +2478,7 @@ void ScriptThread::Stop(void)
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptThread::Wait(float time)
|
||||
void ScriptThread::Wait(int time)
|
||||
{
|
||||
StartTiming(level.inttime + time);
|
||||
m_ScriptVM->Suspend();
|
||||
|
||||
Reference in new issue
Block a user