mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Put the if statement where its actually happening
Moved the if statement to where the functions are actually being called for sliptide and 'dust'
This commit is contained in:
parent
06d2843114
commit
c83decd4a2
1 changed files with 13 additions and 17 deletions
|
|
@ -154,8 +154,6 @@ static void SpawnSPBDust(mobj_t *spb)
|
||||||
angle_t sa = spb->angle - ANG1*60;
|
angle_t sa = spb->angle - ANG1*60;
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
if ((spb_intangible(spb) != SPB_FLASHING)) // If the SPB is intangible, don't spawn the "v" dust wave
|
|
||||||
{
|
|
||||||
if (spb->eflags & MFE_VERTICALFLIP)
|
if (spb->eflags & MFE_VERTICALFLIP)
|
||||||
{
|
{
|
||||||
sz = spb->ceilingz;
|
sz = spb->ceilingz;
|
||||||
|
|
@ -190,7 +188,6 @@ static void SpawnSPBDust(mobj_t *spb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Spawns SPB slip tide. To be used when the SPB is turning.
|
// Spawns SPB slip tide. To be used when the SPB is turning.
|
||||||
// Modified version of K_SpawnAIZDust. Maybe we could merge those to be cleaner?
|
// Modified version of K_SpawnAIZDust. Maybe we could merge those to be cleaner?
|
||||||
|
|
@ -205,8 +202,6 @@ static void SpawnSPBSliptide(mobj_t *spb, SINT8 dir)
|
||||||
angle_t travelangle;
|
angle_t travelangle;
|
||||||
fixed_t sz = spb->floorz;
|
fixed_t sz = spb->floorz;
|
||||||
|
|
||||||
if ((spb_intangible(spb) != SPB_FLASHING)) // Tired of this thing whacking people when switching targets, don't sliptide if intangible either
|
|
||||||
{
|
|
||||||
if (spb->eflags & MFE_VERTICALFLIP)
|
if (spb->eflags & MFE_VERTICALFLIP)
|
||||||
{
|
{
|
||||||
sz = spb->ceilingz;
|
sz = spb->ceilingz;
|
||||||
|
|
@ -238,8 +233,6 @@ static void SpawnSPBSliptide(mobj_t *spb, SINT8 dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Used for seeking and when SPB is trailing its target from way too close!
|
// Used for seeking and when SPB is trailing its target from way too close!
|
||||||
static void SpawnSPBSpeedLines(mobj_t *spb)
|
static void SpawnSPBSpeedLines(mobj_t *spb)
|
||||||
{
|
{
|
||||||
|
|
@ -633,6 +626,8 @@ static void SPBSeek(mobj_t *spb, mobj_t *bestMobj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spb_intangible(spb) != SPB_FLASHING || (spb_modetimer(spb) <= 0)) // Tired of this thing whacking people when switching targets
|
||||||
|
{
|
||||||
if (sliptide != 0)
|
if (sliptide != 0)
|
||||||
{
|
{
|
||||||
// 1 if turning left, -1 if turning right.
|
// 1 if turning left, -1 if turning right.
|
||||||
|
|
@ -644,6 +639,7 @@ static void SPBSeek(mobj_t *spb, mobj_t *bestMobj)
|
||||||
// if we're mostly going straight, then spawn the V dust cone!
|
// if we're mostly going straight, then spawn the V dust cone!
|
||||||
SpawnSPBDust(spb);
|
SpawnSPBDust(spb);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Always spawn speed lines while seeking
|
// Always spawn speed lines while seeking
|
||||||
SpawnSPBSpeedLines(spb);
|
SpawnSPBSpeedLines(spb);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue