diff --git a/src/dehacked.c b/src/dehacked.c index baa5f13b3..9491aa6bc 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -2226,7 +2226,9 @@ static actionpointer_t actionpointers[] = {{A_CryingToMomma}, "A_CRYINGTOMOMMA"}, {{A_CheckFlags2}, "A_CHECKFLAGS2"}, {{A_DoNPCPain}, "A_DONPCPAIN"}, + {{A_PrepareRepeat}, "A_PREPAREREPEAT"}, {{A_Boss5ExtraRepeat}, "A_BOSS5EXTRAREPEAT"}, + {{A_Boss5Calm}, "A_BOSS5CALM"}, {{A_Boss5CheckOnGround}, "A_BOSS5CHECKONGROUND"}, {{A_Boss5CheckFalling}, "A_BOSS5CHECKFALLING"}, diff --git a/src/info.h b/src/info.h index 166402651..7c93457d6 100644 --- a/src/info.h +++ b/src/info.h @@ -240,7 +240,9 @@ void A_ParentTriesToSleep(); void A_CryingToMomma(); void A_CheckFlags2(); void A_DoNPCPain(); +void A_PrepareRepeat(); void A_Boss5ExtraRepeat(); +void A_Boss5Calm(); void A_Boss5CheckOnGround(); void A_Boss5CheckFalling(); diff --git a/src/p_enemy.c b/src/p_enemy.c index 283a83559..c7e1e90f3 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -267,6 +267,9 @@ void A_ParentTriesToSleep(mobj_t *actor); void A_CryingToMomma(mobj_t *actor); void A_CheckFlags2(mobj_t *actor); void A_DoNPCPain(mobj_t *actor); +void A_PrepareRepeat(mobj_t *actor); +void A_Boss5ExtraRepeat(mobj_t *actor); +void A_Boss5Calm(mobj_t *actor); void A_Boss5CheckOnGround(mobj_t *actor); void A_Boss5CheckFalling(mobj_t *actor); //for p_enemy.c @@ -11913,7 +11916,26 @@ void A_DoNPCPain(mobj_t *actor) P_InstaThrust(actor, actor->angle, -hspeed); } -// Function: A_Boss5PinchRepeat +// Function: A_PrepareRepeat +// +// Description: Simple way to prepare A_Repeat. +// +// var1 = value to set extravalue2 to +// var2 = unused +// +void A_PrepareRepeat(mobj_t *actor) +{ + INT32 locvar1 = var1; + //INT32 locvar2 = var2; +#ifdef HAVE_BLUA + if (LUA_CallAction("A_PrepareRepeat", actor)) + return; +#endif + + actor->extravalue2 = locvar1; +} + +// Function: A_Boss5ExtraRepeat // // Description: Simple way to prepare A_Repeat. // @@ -11952,6 +11974,23 @@ void A_Boss5ExtraRepeat(mobj_t *actor) actor->extravalue2 += locvar2; } +// Function: A_Boss5Calm +// +// Description: Simple way to disable MF2_FRET (and enable MF_SHOOTABLE the first time it's called) +// +// var1 = unused +// var2 = unused +// +void A_Boss5Calm(mobj_t *actor) +{ +#ifdef HAVE_BLUA + if (LUA_CallAction("A_Boss5Calm", actor)) + return; +#endif + actor->flags |= MF_SHOOTABLE; + actor->flags2 &= ~MF2_FRET; +} + // Function: A_Boss5CheckOnGround // // Description: Ground checker.