mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
Expose "server" and "dedicated" to Lua scripts
Careful! Both are local variables and are always false for clients, and therefore should obviously not be used in anything gamelogic-related.
This commit is contained in:
parent
9f54ad4ea3
commit
ab7ccbc5d5
1 changed files with 6 additions and 6 deletions
|
@ -9718,12 +9718,12 @@ static inline int lib_getenum(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
LUA_PushUserdata(L, &players[consoleplayer], META_PLAYER);
|
LUA_PushUserdata(L, &players[consoleplayer], META_PLAYER);
|
||||||
return 1;
|
return 1;
|
||||||
/*} else if (fastcmp(word,"admin")) {
|
} else if (fastcmp(word,"isserver")) {
|
||||||
LUA_Deprecated(L, "admin", "IsPlayerAdmin(player)");
|
lua_pushboolean(L, server);
|
||||||
if (!playeringame[adminplayers[0]] || IsPlayerAdmin(serverplayer))
|
return 1;
|
||||||
return 0;
|
} else if (fastcmp(word, "isdedicatedserver")) {
|
||||||
LUA_PushUserdata(L, &players[adminplayers[0]], META_PLAYER);
|
lua_pushboolean(L, dedicated);
|
||||||
return 1;*/
|
return 1;
|
||||||
} else if (fastcmp(word,"gravity")) {
|
} else if (fastcmp(word,"gravity")) {
|
||||||
lua_pushinteger(L, gravity);
|
lua_pushinteger(L, gravity);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue