If flags are not specified, assume 0 for P_DoPlayerExit

This commit is contained in:
NepDisk 2025-11-13 10:02:02 -05:00
parent 599cbafd65
commit 1bc89c3fa7

View file

@ -1418,7 +1418,7 @@ static int lib_pMovePlayer(lua_State *L)
static int lib_pDoPlayerExit(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
pflags_t flags = luaL_checkinteger(L, 2);
pflags_t flags = lua_isnoneornil(L, 2) ? 0 : luaL_checkinteger(L, 2);
NOHUD
INLEVEL
if (!player)