Don't re-update scripting engine during rewind

This commit is contained in:
Benau 2018-07-08 12:58:57 +08:00
parent 0fa444fbbf
commit 17d1bddf0d

View File

@ -1044,8 +1044,13 @@ void World::update(int ticks)
PROFILER_POP_CPU_MARKER();
if(race_manager->isRecordingRace()) ReplayRecorder::get()->update(ticks);
Scripting::ScriptEngine *script_engine = Scripting::ScriptEngine::getInstance();
if (script_engine) script_engine->update(ticks);
if (!RewindManager::get()->isRewinding())
{
Scripting::ScriptEngine *script_engine =
Scripting::ScriptEngine::getInstance();
if (script_engine)
script_engine->update(ticks);
}
Physics::getInstance()->update(ticks);