mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Further improvements on MI's request, just to be safe.
This commit is contained in:
parent
b8d3e27bba
commit
0692a5a5c4
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…
Add table
Reference in a new issue