mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 18:01:16 +00:00
Merge branch 'dashmode-lowroad' into 'next'
Have Metal Sonic use spinheight while dashing See merge request STJr/SRB2!1382
This commit is contained in:
commit
70bcb6081f
1 changed files with 7 additions and 2 deletions
|
@ -11368,6 +11368,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
|
|||
mobj_t *mo = player->mo;
|
||||
angle_t angle = player->drawangle;
|
||||
fixed_t dist;
|
||||
fixed_t heightoffset = ((mo->eflags & MFE_VERTICALFLIP) ? mo->height - (P_GetPlayerHeight(player) >> 1) : (P_GetPlayerHeight(player) >> 1));
|
||||
panim_t panim = player->panim;
|
||||
tic_t dashmode = min(player->dashmode, DASHMODE_MAX);
|
||||
boolean underwater = mo->eflags & MFE_UNDERWATER;
|
||||
|
@ -11401,7 +11402,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
|
|||
offsetV = i*P_ReturnThrustY(fume, fume->movedir, radiusV);
|
||||
x = mo->x + radiusX + FixedMul(offsetH, factorX);
|
||||
y = mo->y + radiusY + FixedMul(offsetH, factorY);
|
||||
z = mo->z + (mo->height >> 1) + offsetV;
|
||||
z = mo->z + heightoffset + offsetV;
|
||||
P_SpawnMobj(x, y, z, MT_SMALLBUBBLE)->scale = mo->scale >> 1;
|
||||
}
|
||||
|
||||
|
@ -11464,7 +11465,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
|
|||
P_UnsetThingPosition(fume);
|
||||
fume->x = mo->x + P_ReturnThrustX(fume, angle, dist);
|
||||
fume->y = mo->y + P_ReturnThrustY(fume, angle, dist);
|
||||
fume->z = mo->z + ((mo->height - fume->height) >> 1);
|
||||
fume->z = mo->z + heightoffset - (fume->height >> 1);
|
||||
P_SetThingPosition(fume);
|
||||
|
||||
// If dashmode is high enough, spawn a trail
|
||||
|
@ -12982,6 +12983,8 @@ boolean P_PlayerCanEnterSpinGaps(player_t *player)
|
|||
|
||||
return ((player->pflags & (PF_SPINNING|PF_SLIDING|PF_GLIDING)) // players who are spinning, sliding, or gliding
|
||||
|| (player->charability == CA_GLIDEANDCLIMB && player->mo->state-states == S_PLAY_GLIDE_LANDING) // players who are landing from a glide
|
||||
|| ((player->charflags & (SF_DASHMODE|SF_MACHINE)) == (SF_DASHMODE|SF_MACHINE)
|
||||
&& player->dashmode >= DASHMODE_THRESHOLD && player->mo->state-states == S_PLAY_DASH) // machine players in dashmode
|
||||
|| JUMPCURLED(player)); // players who are jumpcurled, but only if they would normally jump that way
|
||||
}
|
||||
|
||||
|
@ -12994,5 +12997,7 @@ boolean P_PlayerShouldUseSpinHeight(player_t *player)
|
|||
|| ((player->powers[pw_tailsfly] || (player->charability == CA_FLY && player->mo->state-states == S_PLAY_FLY_TIRED))
|
||||
&& !(player->charflags & SF_NOJUMPSPIN))
|
||||
|| (player->charability == CA_GLIDEANDCLIMB && player->mo->state-states == S_PLAY_GLIDE_LANDING)
|
||||
|| ((player->charflags & (SF_DASHMODE|SF_MACHINE)) == (SF_DASHMODE|SF_MACHINE)
|
||||
&& player->dashmode >= DASHMODE_THRESHOLD && player->mo->state-states == S_PLAY_DASH)
|
||||
|| JUMPCURLED(player));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue