mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 19:02:45 +00:00
Further improvements on MI's request, just to be safe.
This commit is contained in:
parent
1d799630af
commit
5dc095a47d
1 changed files with 7 additions and 4 deletions
|
@ -2051,12 +2051,15 @@ static int lib_evCrumbleChain(lua_State *L)
|
|||
ffloor_t *rover = NULL;
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (lua_isuserdata(L, 2))
|
||||
if (!lua_isnone(L, 2))
|
||||
{
|
||||
sec = *((sector_t **)luaL_checkudata(L, 1, META_SECTOR));
|
||||
if (!lua_isnil(L, 1))
|
||||
{
|
||||
sec = *((sector_t **)luaL_checkudata(L, 1, META_SECTOR));
|
||||
if (!sec)
|
||||
return LUA_ErrInvalid(L, "sector_t");
|
||||
}
|
||||
rover = *((ffloor_t **)luaL_checkudata(L, 2, META_FFLOOR));
|
||||
if (!sec)
|
||||
return LUA_ErrInvalid(L, "sector_t");
|
||||
}
|
||||
else
|
||||
rover = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR));
|
||||
|
|
Loading…
Reference in a new issue