mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch '@moderator' into 'next'
Kill adminplayer for good See merge request STJr/SRB2!686
This commit is contained in:
commit
acb3372644
2 changed files with 1 additions and 8 deletions
|
@ -27,7 +27,7 @@ This version is independent of the mod name, and standard
|
|||
version and subversion. It should only account for the
|
||||
basic fields of the packet, and change infrequently.
|
||||
*/
|
||||
#define PACKETVERSION 1
|
||||
#define PACKETVERSION 2
|
||||
|
||||
// Network play related stuff.
|
||||
// There is a data struct that stores network
|
||||
|
@ -366,7 +366,6 @@ typedef struct
|
|||
UINT8 cheatsenabled;
|
||||
UINT8 isdedicated;
|
||||
UINT8 fileneedednum;
|
||||
SINT8 adminplayer;
|
||||
tic_t time;
|
||||
tic_t leveltime;
|
||||
char servername[MAXSERVERNAME];
|
||||
|
|
|
@ -274,12 +274,6 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
|||
return 0;
|
||||
LUA_PushUserdata(L, &players[serverplayer], META_PLAYER);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"admin")) { // BACKWARDS COMPATIBILITY HACK: This was replaced with IsPlayerAdmin(), but some 2.1 Lua scripts still use the admin variable. It now points to the first admin player in the array.
|
||||
LUA_Deprecated(L, "admin", "IsPlayerAdmin(player)");
|
||||
if (!playeringame[adminplayers[0]] || IsPlayerAdmin(serverplayer))
|
||||
return 0;
|
||||
LUA_PushUserdata(L, &players[adminplayers[0]], META_PLAYER);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"emeralds")) {
|
||||
lua_pushinteger(L, emeralds);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue