This Black Eggman? ***YEET***

Resolve issue #399 in the silliest way possible: by having Brak be yeeted off the platform by an explosion at his feet, preventing the downed mech from being anywhere near the escape pod.
This commit is contained in:
toaster 2019-11-29 21:55:25 +00:00
parent bc00380aa4
commit 339907fd5d
3 changed files with 49 additions and 15 deletions

View file

@ -1619,13 +1619,13 @@ state_t states[NUMSTATES] =
{SPR_BRAK, 18, 0, {A_CheckHealth}, 3, S_CYBRAKDEMON_PAIN3, S_CYBRAKDEMON_CHOOSE_ATTACK1}, // S_CYBRAKDEMON_PAIN2
{SPR_BRAK, 18, 0, {A_LinedefExecute}, LE_PINCHPHASE, 0, S_CYBRAKDEMON_CHOOSE_ATTACK1}, // S_CYBRAKDEMON_PAIN3
{SPR_BRAK, 18, 1, {A_Repeat}, 1, S_CYBRAKDEMON_DIE1, S_CYBRAKDEMON_DIE2}, // S_CYBRAKDEMON_DIE1
{SPR_BRAK, 18, 2, {A_BossScream}, 0, 0, S_CYBRAKDEMON_DIE3}, // S_CYBRAKDEMON_DIE2
{SPR_BRAK, 18, 2, {A_BossScream}, 2, 0, S_CYBRAKDEMON_DIE3}, // S_CYBRAKDEMON_DIE2
{SPR_BRAK, 18, 0, {A_Repeat}, 52, S_CYBRAKDEMON_DIE2, S_CYBRAKDEMON_DIE4}, // S_CYBRAKDEMON_DIE3
{SPR_BRAK, 13, 14, {A_PlaySound}, sfx_bedie2, 0, S_CYBRAKDEMON_DIE5}, // S_CYBRAKDEMON_DIE4
{SPR_BRAK, 14, 7, {NULL}, 0, 0, S_CYBRAKDEMON_DIE6}, // S_CYBRAKDEMON_DIE5
{SPR_BRAK, 15, 5, {NULL}, 0, 0, S_CYBRAKDEMON_DIE7}, // S_CYBRAKDEMON_DIE6
{SPR_BRAK, 16, 3, {A_PlaySound}, sfx_bgxpld, 0, S_CYBRAKDEMON_DIE8}, // S_CYBRAKDEMON_DIE7
{SPR_BRAK, 17, -1, {A_BossDeath}, 0, 0, S_NULL}, // S_CYBRAKDEMON_DIE8
{SPR_BRAK, 13, 34, {A_BossDeath}, 0, 0, S_CYBRAKDEMON_DIE5}, // S_CYBRAKDEMON_DIE4
{SPR_BRAK, 14, 34, {NULL}, 0, 0, S_CYBRAKDEMON_DIE6}, // S_CYBRAKDEMON_DIE5
{SPR_BRAK, 15, 34, {NULL}, 0, 0, S_CYBRAKDEMON_DIE7}, // S_CYBRAKDEMON_DIE6
{SPR_BRAK, 16, 34, {NULL}, 0, 0, S_CYBRAKDEMON_DIE8}, // S_CYBRAKDEMON_DIE7
{SPR_BRAK, 17, 34, {NULL}, sfx_befall, 0, S_CYBRAKDEMON_DIE8}, // S_CYBRAKDEMON_DIE8
{SPR_BRAK, 0, 0, {A_SetObjectFlags}, MF_SPECIAL|MF_SHOOTABLE, 2, S_CYBRAKDEMON_IDLE}, // S_CYBRAKDEMON_DEINVINCIBLERIZE
{SPR_BRAK, 0, 0, {A_SetObjectFlags}, MF_SPECIAL|MF_SHOOTABLE, 1, S_CYBRAKDEMON_IDLE}, // S_CYBRAKDEMON_INVINCIBLERIZE

View file

@ -3474,18 +3474,14 @@ void A_BossScream(mobj_t *actor)
if (LUA_CallAction("A_BossScream", actor))
return;
#endif
switch (locvar1)
if (locvar1 & 1)
{
default:
case 0:
actor->movecount += 4*16;
actor->movecount %= 360;
fa = (FixedAngle(actor->movecount*FRACUNIT)>>ANGLETOFINESHIFT) & FINEMASK;
break;
case 1:
fa = (FixedAngle(P_RandomKey(360)*FRACUNIT)>>ANGLETOFINESHIFT) & FINEMASK;
break;
}
else
fa = (FixedAngle(P_RandomKey(360)*FRACUNIT)>>ANGLETOFINESHIFT) & FINEMASK;
x = actor->x + FixedMul(FINECOSINE(fa),actor->radius);
y = actor->y + FixedMul(FINESINE(fa),actor->radius);
@ -3495,7 +3491,9 @@ void A_BossScream(mobj_t *actor)
else
explodetype = (mobjtype_t)locvar2;
if (actor->eflags & MFE_VERTICALFLIP)
if (locvar1 & 2)
z = actor->z + (P_RandomKey((actor->height - mobjinfo[explodetype].height)>>FRACBITS)<<FRACBITS);
else if (actor->eflags & MFE_VERTICALFLIP)
z = actor->z + actor->height - mobjinfo[explodetype].height - FixedMul((P_RandomByte()<<(FRACBITS-2)) - 8*FRACUNIT, actor->scale);
else
z = actor->z + FixedMul((P_RandomByte()<<(FRACBITS-2)) - 8*FRACUNIT, actor->scale);
@ -4048,7 +4046,6 @@ bossjustdie:
switch (mo->type)
{
case MT_BLACKEGGMAN:
case MT_CYBRAKDEMON:
{
mo->flags |= MF_NOCLIP;
mo->flags &= ~MF_SPECIAL;
@ -4056,6 +4053,22 @@ bossjustdie:
S_StartSound(NULL, sfx_befall);
break;
}
case MT_CYBRAKDEMON:
{
mo->flags |= MF_NOCLIP;
mo->flags &= ~(MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT);
S_StartSound(NULL, sfx_bedie2);
if (mo->spawnpoint && !(mo->spawnpoint->options & MTF_EXTRA))
{
P_SpawnMobjFromMobj(mo, 0, 0, 0, MT_CYBRAKDEMON_VILE_EXPLOSION);
mo->z += P_MobjFlip(mo);
P_SetObjectMomZ(mo, 12*FRACUNIT, false);
P_InstaThrust(mo, R_PointToAngle2(0, 0, mo->x, mo->y), 14*FRACUNIT);
S_StartSound(mo, sfx_bgxpld);
}
break;
}
case MT_KOOPA:
{
junk.tag = LE_KOOPA;

View file

@ -1572,6 +1572,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
}
break;
case MT_WATERDROP:
case MT_CYBRAKDEMON:
gravityadd >>= 1;
default:
break;
@ -8191,6 +8192,26 @@ void P_MobjThinker(mobj_t *mobj)
else if (mobj->target)
P_InstaThrust(mobj, mobj->angle, FixedMul(12*FRACUNIT, mobj->scale));
}
if (mobj->type == MT_CYBRAKDEMON && !mobj->health)
{
if (!(mobj->tics & 1))
{
var1 = 2;
var2 = 0;
A_BossScream(mobj);
}
if (mobj->momz && mobj->z+mobj->momz <= mobj->floorz)
{
if (P_CheckDeathPitCollide(mobj))
{
P_RemoveMobj(mobj);
return;
}
S_StartSound(mobj, sfx_befall);
if (mobj->state != states+S_CYBRAKDEMON_DIE8)
P_SetMobjState(mobj, S_CYBRAKDEMON_DIE8);
}
}
}
else if (mobj->health <= 0) // Dead things think differently than the living.
switch (mobj->type)