mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Modified melee/twinspin springboost.
This commit is contained in:
parent
302305ccf5
commit
79f2d616fc
1 changed files with 7 additions and 8 deletions
15
src/p_map.c
15
src/p_map.c
|
|
@ -130,19 +130,13 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ESLOPE
|
|
||||||
object->standingslope = NULL; // Okay, now we can't return - no launching off at silly angles for you.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (object->player
|
if (object->player
|
||||||
&& ((object->player->charability == CA_TWINSPIN && object->player->panim == PA_ABILITY)
|
&& ((object->player->charability == CA_TWINSPIN && object->player->panim == PA_ABILITY)
|
||||||
|| (object->player->charability2 == CA2_MELEE && object->player->panim == PA_ABILITY2)))
|
|| (object->player->charability2 == CA2_MELEE && object->player->panim == PA_ABILITY2)))
|
||||||
{
|
{
|
||||||
S_StartSound(object, sfx_s3k8b);
|
S_StartSound(object, sfx_s3k8b);
|
||||||
#define scalefactor ((4*FRACUNIT)/3)
|
horizspeed = FixedMul(horizspeed, (4*FRACUNIT)/3);
|
||||||
horizspeed = FixedMul(horizspeed, scalefactor);
|
vertispeed = FixedMul(vertispeed, (6*FRACUNIT)/5); // aprox square root of above
|
||||||
vertispeed = FixedMul(vertispeed, FixedSqrt(scalefactor));
|
|
||||||
#undef scalefactor
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object->eflags |= MFE_SPRUNG; // apply this flag asap!
|
object->eflags |= MFE_SPRUNG; // apply this flag asap!
|
||||||
|
|
@ -239,6 +233,11 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
else
|
else
|
||||||
P_SetPlayerMobjState(object, S_PLAY_FALL);
|
P_SetPlayerMobjState(object, S_PLAY_FALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ESLOPE
|
||||||
|
object->standingslope = NULL; // Okay, now we know it's not going to be relevant - no launching off at silly angles for you.
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue