mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +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;
|
||||
}
|
||||
|
||||
#ifdef ESLOPE
|
||||
object->standingslope = NULL; // Okay, now we can't return - no launching off at silly angles for you.
|
||||
#endif
|
||||
|
||||
if (object->player
|
||||
&& ((object->player->charability == CA_TWINSPIN && object->player->panim == PA_ABILITY)
|
||||
|| (object->player->charability2 == CA2_MELEE && object->player->panim == PA_ABILITY2)))
|
||||
{
|
||||
S_StartSound(object, sfx_s3k8b);
|
||||
#define scalefactor ((4*FRACUNIT)/3)
|
||||
horizspeed = FixedMul(horizspeed, scalefactor);
|
||||
vertispeed = FixedMul(vertispeed, FixedSqrt(scalefactor));
|
||||
#undef scalefactor
|
||||
horizspeed = FixedMul(horizspeed, (4*FRACUNIT)/3);
|
||||
vertispeed = FixedMul(vertispeed, (6*FRACUNIT)/5); // aprox square root of above
|
||||
}
|
||||
|
||||
object->eflags |= MFE_SPRUNG; // apply this flag asap!
|
||||
|
@ -239,6 +233,11 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
else
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue