diff --git a/src/scriptengine/script_engine.cpp b/src/scriptengine/script_engine.cpp index 3a51960ed..c7921f446 100644 --- a/src/scriptengine/script_engine.cpp +++ b/src/scriptengine/script_engine.cpp @@ -562,8 +562,9 @@ namespace Scripting //----------------------------------------------------------------------------- - void ScriptEngine::update(double dt) + void ScriptEngine::update(int ticks) { + double dt = stk_config->ticks2Time(ticks); for (int i = m_pending_timeouts.size() - 1; i >= 0; i--) { PendingTimeout& curr = m_pending_timeouts[i]; diff --git a/src/scriptengine/script_engine.hpp b/src/scriptengine/script_engine.hpp index f542c8220..063bb43a3 100644 --- a/src/scriptengine/script_engine.hpp +++ b/src/scriptengine/script_engine.hpp @@ -82,7 +82,7 @@ namespace Scripting void addPendingTimeout(double time, const std::string& callback_name); void addPendingTimeout(double time, asIScriptFunction* delegate_fn); - void update(double dt); + void update(int ticks); asIScriptEngine* getEngine() { return m_engine; }