Merge the dedicatedserver and server global variables

Previously in Lua, dedicatedserver would only return true if the player running the script was the one hosting the dedicated server. In all other cases, it would return nil. This fixes it to point to the server host no matter what.
This commit is contained in:
Wolfy authored and Alam Ed Arias committed 2014-09-05 20:23:32 -04:00
1 parent cd1ab74bcd
commit 8a4ec56ef5
1 file changed
+1 -6
+1 -6
View File
@@ -8681,12 +8681,7 @@ static inline int lib_getenum(lua_State *L)
lua_pushinteger(L, mapmusic);
return 1;
} else if (fastcmp(word,"server")) {
if (dedicated || !playeringame[serverplayer])
return 0;
LUA_PushUserdata(L, &players[serverplayer], META_PLAYER);
return 1;
} else if (fastcmp(word,"dedicatedserver")) {
if (!dedicated)
if (!playeringame[serverplayer])
return 0;
LUA_PushUserdata(L, &players[serverplayer], META_PLAYER);
return 1;