mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
hardcoded the boss's A_BossDeath behaviour.
(also turned this part of the function into a switch case to make things neater)
This commit is contained in:
parent
4ad410dc0b
commit
27722be6a1
1 changed files with 88 additions and 44 deletions
|
|
@ -3562,20 +3562,62 @@ bossjustdie:
|
||||||
else if (P_MobjWasRemoved(mo))
|
else if (P_MobjWasRemoved(mo))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
if (mo->type == MT_BLACKEGGMAN || mo->type == MT_CYBRAKDEMON)
|
switch (mo->type)
|
||||||
|
{
|
||||||
|
case MT_BLACKEGGMAN:
|
||||||
|
case MT_CYBRAKDEMON:
|
||||||
{
|
{
|
||||||
mo->flags |= MF_NOCLIP;
|
mo->flags |= MF_NOCLIP;
|
||||||
mo->flags &= ~MF_SPECIAL;
|
mo->flags &= ~MF_SPECIAL;
|
||||||
|
|
||||||
S_StartSound(NULL, sfx_befall);
|
S_StartSound(NULL, sfx_befall);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (mo->type == MT_KOOPA)
|
case MT_KOOPA:
|
||||||
{
|
{
|
||||||
junk.tag = 650;
|
junk.tag = 650;
|
||||||
EV_DoCeiling(&junk, raiseToHighest);
|
EV_DoCeiling(&junk, raiseToHighest);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else // eggmobiles
|
case MT_FANG:
|
||||||
|
{
|
||||||
|
if (mo->tracer)
|
||||||
|
{
|
||||||
|
var1 = var2 = 0;
|
||||||
|
A_Boss5Jump(mo);
|
||||||
|
mo->momx = ((16 - 1)*mo->momx)/16;
|
||||||
|
mo->momy = ((16 - 1)*mo->momy)/16;
|
||||||
|
if (!(mo->flags2 & MF2_AMBUSH))
|
||||||
|
{
|
||||||
|
const fixed_t time = FixedHypot(mo->tracer->x - mo->x, mo->tracer->y - mo->y)/FixedHypot(mo->momx, mo->momy);
|
||||||
|
const fixed_t speed = 64*FRACUNIT;
|
||||||
|
mobj_t *pole = P_SpawnMobj(
|
||||||
|
mo->tracer->x - P_ReturnThrustX(mo->tracer, mo->tracer->angle, speed*time),
|
||||||
|
mo->tracer->y - P_ReturnThrustY(mo->tracer, mo->tracer->angle, speed*time),
|
||||||
|
mo->tracer->floorz + 4*FRACUNIT,
|
||||||
|
MT_FSGNB);
|
||||||
|
P_SetTarget(&pole->tracer, P_SpawnMobj(
|
||||||
|
pole->x + P_ReturnThrustX(pole, mo->tracer->angle, FRACUNIT),
|
||||||
|
pole->y + P_ReturnThrustY(pole, mo->tracer->angle, FRACUNIT),
|
||||||
|
pole->z + 256*FRACUNIT,
|
||||||
|
MT_FSGNA));
|
||||||
|
pole->angle = mo->tracer->angle;
|
||||||
|
pole->tracer->angle = pole->angle - ANGLE_90;
|
||||||
|
pole->momx = P_ReturnThrustX(pole, pole->angle, speed);
|
||||||
|
pole->momy = P_ReturnThrustY(pole, pole->angle, speed);
|
||||||
|
pole->tracer->momx = pole->momx;
|
||||||
|
pole->tracer->momy = pole->momy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
P_SetObjectMomZ(mo, 10*FRACUNIT, false);
|
||||||
|
mo->flags |= MF_NOGRAVITY;
|
||||||
|
}
|
||||||
|
mo->flags |= MF_NOCLIP|MF_NOCLIPHEIGHT;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
default: //eggmobiles
|
||||||
{
|
{
|
||||||
// Stop exploding and prepare to run.
|
// Stop exploding and prepare to run.
|
||||||
P_SetMobjState(mo, mo->info->xdeathstate);
|
P_SetMobjState(mo, mo->info->xdeathstate);
|
||||||
|
|
@ -3615,6 +3657,8 @@ bossjustdie:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mo->momz = FixedMul(2*FRACUNIT, mo->scale);
|
mo->momz = FixedMul(2*FRACUNIT, mo->scale);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mo->type == MT_EGGMOBILE2)
|
if (mo->type == MT_EGGMOBILE2)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue