mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Made it possible to just call EV_CrumbleChain(rover) in Lua
This commit is contained in:
parent
6603b605e7
commit
b8d3e27bba
1 changed files with 11 additions and 4 deletions
|
|
@ -2047,12 +2047,19 @@ static int lib_pStartQuake(lua_State *L)
|
|||
|
||||
static int lib_evCrumbleChain(lua_State *L)
|
||||
{
|
||||
sector_t *sec = *((sector_t **)luaL_checkudata(L, 1, META_SECTOR));
|
||||
ffloor_t *rover = *((ffloor_t **)luaL_checkudata(L, 2, META_FFLOOR));
|
||||
sector_t *sec = NULL;
|
||||
ffloor_t *rover = NULL;
|
||||
NOHUD
|
||||
INLEVEL
|
||||
/*if (!sec)
|
||||
return LUA_ErrInvalid(L, "sector_t");*/
|
||||
if (lua_isuserdata(L, 2))
|
||||
{
|
||||
sec = *((sector_t **)luaL_checkudata(L, 1, META_SECTOR));
|
||||
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));
|
||||
if (!rover)
|
||||
return LUA_ErrInvalid(L, "ffloor_t");
|
||||
EV_CrumbleChain(sec, rover);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue