From 14d47213efcf8b7e8e042731026daf89039f9c30 Mon Sep 17 00:00:00 2001 From: Koncord Date: Sat, 28 Oct 2017 02:34:45 +0800 Subject: [PATCH] [Server] Add Players.size() to Lua API --- apps/openmw-mp/Players.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw-mp/Players.cpp b/apps/openmw-mp/Players.cpp index 1e34d30c7..8b305b3bc 100644 --- a/apps/openmw-mp/Players.cpp +++ b/apps/openmw-mp/Players.cpp @@ -18,6 +18,10 @@ void Players::Init(LuaState &lua) for (shared_ptr player : store) func(player); }); + + playersTable.set_function("size", [](){ + return store.size(); + }); }