diff --git a/source/game/scripting/StarLuaRoot.cpp b/source/game/scripting/StarLuaRoot.cpp index c538df1..fc205c0 100644 --- a/source/game/scripting/StarLuaRoot.cpp +++ b/source/game/scripting/StarLuaRoot.cpp @@ -106,7 +106,7 @@ LuaContext LuaRoot::createContext(StringList const& scriptPaths) { } }); - newContext.set("loadstring", m_luaEngine->createFunction([newContext](String const& source, Maybe const& name, Maybe const& env) -> LuaFunction { + newContext.set("loadstring", m_luaEngine->createFunction([&newContext](String const& source, Maybe const& name, Maybe const& env) -> LuaFunction { String functionName = name ? strf("loadstring: {}", *name) : "loadstring"; return newContext.engine().createFunctionFromSource(newContext.handleIndex(), source.utf8Ptr(), source.utf8Size(), functionName.utf8Ptr()); })); diff --git a/source/utility/world_benchmark.cpp b/source/utility/world_benchmark.cpp index 40476a1..90524f5 100644 --- a/source/utility/world_benchmark.cpp +++ b/source/utility/world_benchmark.cpp @@ -81,7 +81,7 @@ int main(int argc, char** argv) { lastReport = Time::monotonicTime(); coutf("[{}] {}s | FPS: {} | Entities: {}\n", j, Time::monotonicTime() - start, fps, entityCount); } - worldServer.update(); + worldServer.update(ServerGlobalTimestep * GlobalTimescale); } double totalTime = Time::monotonicTime() - start; coutf("Finished run of running dungeon world '{}' with seed {} for {} steps in {} seconds, average FPS: {}\n",