Skip to content
Snippets Groups Projects

Expose "server" and "dedicated" to Lua scripts

Merged LJ Sonic requested to merge lua-server-variables into next
1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
+ 6
0
@@ -326,6 +326,12 @@ int LUA_PushGlobals(lua_State *L, const char *word)
return 0;
LUA_PushUserdata(L, &players[secondarydisplayplayer], META_PLAYER);
return 1;
} else if (fastcmp(word,"isserver")) {
lua_pushboolean(L, server);
return 1;
} else if (fastcmp(word,"isdedicatedserver")) {
lua_pushboolean(L, dedicated);
return 1;
// end local player variables
} else if (fastcmp(word,"server")) {
if ((!multiplayer || !netgame) && !playeringame[serverplayer])
Loading