Make displayplayer writable.

This commit is contained in:
GoldenTails 2020-11-05 13:43:33 -06:00
parent 8a0f55e4ad
commit f42dee1871

View file

@ -382,6 +382,13 @@ int LUA_CheckGlobals(lua_State *L, const char *word)
token = (UINT32)luaL_checkinteger(L, 2); token = (UINT32)luaL_checkinteger(L, 2);
else if (fastcmp(word, "gravity")) else if (fastcmp(word, "gravity"))
gravity = (fixed_t)luaL_checkinteger(L, 2); gravity = (fixed_t)luaL_checkinteger(L, 2);
else if (fastcmp(word, "displayplayer"))
{
player_t *player = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
if (player)
displayplayer = player - players;
}
else else
return 0; return 0;