mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
This commit is contained in:
parent
5f3cfc6729
commit
3feac5bc90
4 changed files with 24 additions and 7 deletions
|
@ -4772,11 +4772,11 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_METALSONIC_FLOAT",
|
||||
"S_METALSONIC_VECTOR",
|
||||
"S_METALSONIC_STUN",
|
||||
"S_METALSONIC_BLOCK",
|
||||
"S_METALSONIC_RAISE",
|
||||
"S_METALSONIC_GATHER",
|
||||
"S_METALSONIC_DASH",
|
||||
"S_METALSONIC_BOUNCE",
|
||||
"S_METALSONIC_BADBOUNCE",
|
||||
"S_METALSONIC_SHOOT",
|
||||
"S_METALSONIC_PAIN",
|
||||
"S_METALSONIC_DEATH",
|
||||
|
|
|
@ -1369,11 +1369,11 @@ state_t states[NUMSTATES] =
|
|||
{SPR_METL, 4, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_FLOAT
|
||||
{SPR_METL, 12, -1, {NULL}, 0, 0, S_METALSONIC_STUN}, // S_METALSONIC_VECTOR
|
||||
{SPR_METL, 0, -1, {NULL}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_STUN
|
||||
{SPR_METL, 13, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_BLOCK
|
||||
{SPR_METL, 13, 40, {NULL}, 0, 0, S_METALSONIC_GATHER},// S_METALSONIC_RAISE
|
||||
{SPR_METL, 14, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_GATHER
|
||||
{SPR_METL, 15, -1, {NULL}, 0, 0, S_METALSONIC_BOUNCE},// S_METALSONIC_DASH
|
||||
{SPR_METL, 14, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_BOUNCE
|
||||
{SPR_METL, 16, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_BADBOUNCE
|
||||
{SPR_METL, 13, -1, {NULL}, 0, 0, S_METALSONIC_GATHER},// S_METALSONIC_SHOOT
|
||||
{SPR_METL, 11, 40, {A_Pain}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_PAIN
|
||||
{SPR_METL, 11, -1, {A_BossDeath}, 0, 0, S_NULL}, // S_METALSONIC_DEATH
|
||||
|
@ -4952,7 +4952,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_METALSONIC_PAIN, // painstate
|
||||
S_METALSONIC_VECTOR,// painchance
|
||||
sfx_dmpain, // painsound
|
||||
S_METALSONIC_BLOCK, // meleestate
|
||||
S_METALSONIC_BADBOUNCE, // meleestate
|
||||
S_METALSONIC_SHOOT, // missilestate
|
||||
S_METALSONIC_DEATH, // deathstate
|
||||
S_METALSONIC_FLEE1, // xdeathstate
|
||||
|
|
|
@ -1575,11 +1575,11 @@ typedef enum state
|
|||
S_METALSONIC_FLOAT,
|
||||
S_METALSONIC_VECTOR,
|
||||
S_METALSONIC_STUN,
|
||||
S_METALSONIC_BLOCK,
|
||||
S_METALSONIC_RAISE,
|
||||
S_METALSONIC_GATHER,
|
||||
S_METALSONIC_DASH,
|
||||
S_METALSONIC_BOUNCE,
|
||||
S_METALSONIC_BADBOUNCE,
|
||||
S_METALSONIC_SHOOT,
|
||||
S_METALSONIC_PAIN,
|
||||
S_METALSONIC_DEATH,
|
||||
|
|
23
src/p_mobj.c
23
src/p_mobj.c
|
@ -5694,6 +5694,19 @@ static void P_Boss9Thinker(mobj_t *mobj)
|
|||
if (mobj->health <= 0)
|
||||
return;
|
||||
|
||||
if ((statenum_t)(mobj->state-states) == mobj->info->meleestate)
|
||||
{
|
||||
P_InstaThrust(mobj, mobj->angle, -4*FRACUNIT);
|
||||
P_TryMove(mobj, mobj->x+mobj->momx, mobj->y+mobj->momy, true);
|
||||
mobj->momz -= gravity;
|
||||
if (mobj->z < mobj->watertop)
|
||||
{
|
||||
mobj->watertop = mobj->target->floorz + 32*FRACUNIT;
|
||||
P_SetMobjState(mobj, mobj->info->spawnstate);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!mobj->target || !(mobj->target->flags & MF_SHOOTABLE)))
|
||||
{
|
||||
P_BossTargetPlayer(mobj, false);
|
||||
|
@ -5711,6 +5724,10 @@ static void P_Boss9Thinker(mobj_t *mobj)
|
|||
}
|
||||
else if (!mobj->fuse)
|
||||
mobj->fuse = 10*TICRATE;
|
||||
|
||||
// reset to flying so everything gets properly re-initialised
|
||||
mobj->threshold = 0;
|
||||
mobj->movecount = 0;
|
||||
}
|
||||
|
||||
// AI goes here.
|
||||
|
@ -5859,11 +5876,11 @@ static void P_Boss9Thinker(mobj_t *mobj)
|
|||
S_StartSound(mobj, sfx_mspogo);
|
||||
P_BounceMove(mobj);
|
||||
mobj->angle = R_PointToAngle2(mobj->momx, mobj->momy,0,0);
|
||||
mobj->watertop = mobj->target->floorz + 32*FRACUNIT;
|
||||
mobj->momz = 4*FRACUNIT;
|
||||
mobj->flags &= ~MF_PAIN;
|
||||
mobj->fuse = 0;
|
||||
mobj->fuse = 10*TICRATE;
|
||||
mobj->movecount = 0;
|
||||
vectorise;
|
||||
P_SetMobjState(mobj, mobj->info->meleestate);
|
||||
} else if (!(mobj->threshold%4)) { // We've decided to lock onto the player this bounce.
|
||||
S_StartSound(mobj, sfx_s3k5a);
|
||||
mobj->angle = R_PointToAngle2(mobj->x, mobj->y, mobj->target->x + mobj->target->momx*4, mobj->target->y + mobj->target->momy*4);
|
||||
|
|
Loading…
Reference in a new issue