From 07b781cd32dded27446135f64e5794e6102e475e Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 4 Jun 2018 16:11:37 +0300 Subject: [PATCH] [Server] Fix variable name for actor table --- apps/openmw-mp/Actors.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)); }); }