Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Feb 19, 2025
1 parent 56d51d1 commit 197e7dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scriptengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,9 @@ void framework::scriptengine::run() {
lua.script(std::string_view(reinterpret_cast<const char *>(script.data()), script.size()));

lua["setup"]();
const auto loop = lua["loop"].get<sol::function>();
const auto engine = lua["engine"].get<std::shared_ptr<framework::engine>>();
const auto loop = lua["loop"].get<sol::function>();
engine->add_loopable(std::make_shared<lua_loopable>(lua, std::move(loop)));

lua["run"]();
}

0 comments on commit 197e7dd

Please sign in to comment.