diff --git a/apps/openmw-mp/Actors.cpp b/apps/openmw-mp/Actors.cpp index b0c82b856..be9e56b2c 100644 --- a/apps/openmw-mp/Actors.cpp +++ b/apps/openmw-mp/Actors.cpp @@ -116,27 +116,27 @@ bool Actor::doesHaveStatsDynamic() const void ActorController::Init(LuaState &lua) { - sol::table playersTable = lua.getState()->create_named_table("Actors"); + sol::table actorsTable = lua.getState()->create_named_table("Actors"); - playersTable.set_function("createActor", [&lua](){ + actorsTable.set_function("createActor", [&lua](){ return lua.getActorCtrl().createActor(); }); - playersTable.set_function("sendActors", [&lua](shared_ptr player, vector> actors, + actorsTable.set_function("sendActors", [&lua](shared_ptr player, vector> actors, const std::string &cellDescription, bool sendToAll) { lua.getActorCtrl().sendActors(player, actors, Utils::getCellFromDescription(cellDescription), sendToAll); }); - playersTable.set_function("sendList", [&lua](shared_ptr player, vector> actors, + actorsTable.set_function("sendList", [&lua](shared_ptr player, vector> actors, const std::string &cellDescription, bool sendToAll) { lua.getActorCtrl().sendList(player, actors, Utils::getCellFromDescription(cellDescription), sendToAll); }); - playersTable.set_function("requestList", [&lua](shared_ptr player, const std::string &cellDescription){ + actorsTable.set_function("requestList", [&lua](shared_ptr player, const std::string &cellDescription){ lua.getActorCtrl().requestList(player, Utils::getCellFromDescription(cellDescription)); }); - playersTable.set_function("getActors", [&lua](shared_ptr player, const std::string &cellDescription){ + actorsTable.set_function("getActors", [&lua](shared_ptr player, const std::string &cellDescription){ lua.getActorCtrl().getActors(player, Utils::getCellFromDescription(cellDescription)); }); }