Merge branch 'expos-dust' into 'next'

Expose P_DoSpinDashDust to Lua

See merge request STJr/SRB2!1998
This commit is contained in:
Krabs 2023-11-01 16:52:16 +00:00
commit daeb41e73b
3 changed files with 14 additions and 1 deletions

View file

@ -1692,6 +1692,17 @@ static int lib_pDoJump(lua_State *L)
return 0;
}
static int lib_pDoSpinDashDust(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
P_DoSpinDashDust(player);
return 0;
}
static int lib_pSpawnThokMobj(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -4249,6 +4260,7 @@ static luaL_Reg lib[] = {
{"P_HomingAttack",lib_pHomingAttack},
{"P_SuperReady",lib_pSuperReady},
{"P_DoJump",lib_pDoJump},
{"P_DoSpinDashDust",lib_pDoSpinDashDust},
{"P_SpawnThokMobj",lib_pSpawnThokMobj},
{"P_SpawnSpinMobj",lib_pSpawnSpinMobj},
{"P_Telekinesis",lib_pTelekinesis},

View file

@ -204,6 +204,7 @@ void P_Earthquake(mobj_t *inflictor, mobj_t *source, fixed_t radius);
boolean P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in p_user
boolean P_SuperReady(player_t *player);
void P_DoJump(player_t *player, boolean soundandstate);
void P_DoSpinDashDust(player_t *player);
#define P_AnalogMove(player) (P_ControlStyle(player) == CS_LMAOGALOG)
boolean P_TransferToNextMare(player_t *player);
UINT8 P_FindLowestMare(void);

View file

@ -4601,7 +4601,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
}
}
static void P_DoSpinDashDust(player_t *player)
void P_DoSpinDashDust(player_t *player)
{
UINT32 i;
mobj_t *particle;