Skip to content
Permalink
Browse files

Fix potential problem with core.get_connected_players()

  • Loading branch information
sfan5 committed Feb 25, 2020
1 parent 6be7150 commit e2fc93022b46b86070651c5730664baaa363da72
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/script/lua_api/l_env.cpp
@@ -648,6 +648,8 @@ int ModApiEnvMod::l_get_connected_players(lua_State *L)
lua_createtable(L, env->getPlayerCount(), 0);
u32 i = 0;
for (RemotePlayer *player : env->getPlayers()) {
if (player->getPeerId() == PEER_ID_INEXISTENT)
continue;
PlayerSAO *sao = player->getPlayerSAO();
if (sao) {
getScriptApiBase(L)->objectrefGetOrCreate(L, sao);

0 comments on commit e2fc930

Please sign in to comment.
You can’t perform that action at this time.