Cancel any active dash if the player does a ground stomp.

This commit is contained in:
Mari the Deer 2024-01-02 22:34:15 +01:00
commit dae091c7dc
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1076 \cu(Sun 31 Dec 12:02:46 CET 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r1076 \cu(2023-12-31 12:02:46)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1076 \cu(Tue 2 Jan 22:34:15 CET 2024)\c-";
SWWM_SHORTVER="\cw1.3pre r1076 \cu(2024-01-02 22:34:15)\c-";

View file

@ -319,6 +319,7 @@ extend Class Demolitionist
if ( spd > mystats.topspeed ) mystats.topspeed = spd;
if ( spd > ((3600*GameTicRate)/32000.) )
SWWMUtility.AchievementProgress("sanic",int((spd*3600*GameTicRate)/32000.),player);
bool isdashing = InStateSequence(CurState,FindState("Dash"));
if ( player.onground && !bNoGravity && !lastground )
{
// bump down weapon
@ -349,6 +350,8 @@ extend Class Demolitionist
A_StartSound("demolitionist/hardland",CHAN_FOOTSTEP,CHANF_OVERLAP,pitch:.7);
A_StartSound("demolitionist/hardland",CHAN_FOOTSTEP,CHANF_OVERLAP,pitch:.4);
}
// also cancel dashing if we stomped
if ( isdashing ) dashboost = 0.;
mystats.stompcount++;
}
if ( lastvelz < -10 )
@ -484,7 +487,6 @@ extend Class Demolitionist
lastground = player.onground;
lastvelz = prevvelz;
prevvelz = vel.z;
bool isdashing = InStateSequence(CurState,FindState("Dash"));
bool isboosting = InStateSequence(CurState,FindState("Boost"));
bNOFRICTION = ((bFly&&!bFlyCheat&&!(player.cheats&CF_NOCLIP2))||isdashing);
if ( fuelcooldown == 1 ) A_StartSound("demolitionist/fuelregen",CHAN_FUELREGEN,CHANF_LOOP,.35,4.,.5);