mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Expose P_SceneryZMovement to Lua.
Still more complex than P_RingZMovement.
This commit is contained in:
parent
4710e4f07c
commit
df1fd0c456
3 changed files with 14 additions and 1 deletions
|
@ -968,6 +968,17 @@ static int lib_pRingZMovement(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_pSceneryZMovement(lua_State *L)
|
||||
{
|
||||
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (!actor)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
lua_pushboolean(L, P_SceneryZMovement(actor));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// P_USER
|
||||
////////////
|
||||
|
||||
|
@ -3331,6 +3342,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_SceneryXYMovement",lib_pSceneryXYMovement},
|
||||
{"P_ZMovement",lib_pZMovement},
|
||||
{"P_RingZMovement",lib_pRingZMovement},
|
||||
{"P_SceneryZMovement",lib_pSceneryZMovement},
|
||||
|
||||
// p_user
|
||||
{"P_GetPlayerHeight",lib_pGetPlayerHeight},
|
||||
|
|
|
@ -3069,7 +3069,7 @@ nightsdone:
|
|||
}
|
||||
}
|
||||
|
||||
static boolean P_SceneryZMovement(mobj_t *mo)
|
||||
boolean P_SceneryZMovement(mobj_t *mo)
|
||||
{
|
||||
// Intercept the stupid 'fall through 3dfloors' bug
|
||||
if (mo->subsector->sector->ffloors)
|
||||
|
|
|
@ -475,6 +475,7 @@ void P_RingXYMovement(mobj_t *mo);
|
|||
void P_SceneryXYMovement(mobj_t *mo);
|
||||
boolean P_ZMovement(mobj_t *mo);
|
||||
void P_RingZMovement(mobj_t *mo);
|
||||
boolean P_SceneryZMovement(mobj_t *mo);
|
||||
void P_EmeraldManager(void);
|
||||
|
||||
extern INT32 modulothing;
|
||||
|
|
Loading…
Reference in a new issue