mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-11 07:41:36 +00:00
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:
parent
cd1ab74bcd
commit
8a4ec56ef5
1 changed files with 1 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue