mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Merge branch 'landingbetter' into 'master'
Fix all our landing woes. (For now.) See merge request STJr/SRB2Internal!289
This commit is contained in:
commit
54dbd7b4c1
3 changed files with 10 additions and 8 deletions
|
@ -2884,7 +2884,7 @@ static boolean P_ThingHeightClip(mobj_t *thing)
|
|||
if (thing->z != oldz)
|
||||
{
|
||||
if (thing->player)
|
||||
P_PlayerHitFloor(thing->player, false);
|
||||
P_PlayerHitFloor(thing->player, !onfloor);
|
||||
}
|
||||
|
||||
// debug: be sure it falls to the floor
|
||||
|
|
|
@ -716,9 +716,11 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope)
|
|||
vector3_t mom; // Ditto.
|
||||
|
||||
if (slope->flags & SL_NOPHYSICS) { // No physics, no need to make anything complicated.
|
||||
if (P_MobjFlip(thing)*(thing->momz) < 0) { // falling, land on slope
|
||||
//thing->momz = -P_MobjFlip(thing);
|
||||
if (P_MobjFlip(thing)*(thing->momz) < 0) // falling, land on slope
|
||||
{
|
||||
thing->standingslope = slope;
|
||||
if (!thing->player || !(thing->player->pflags & PF_BOUNCING))
|
||||
thing->momz = -P_MobjFlip(thing);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -732,9 +734,9 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope)
|
|||
if (P_MobjFlip(thing)*mom.z < 0) { // falling, land on slope
|
||||
thing->momx = mom.x;
|
||||
thing->momy = mom.y;
|
||||
//thing->momz = -P_MobjFlip(thing);
|
||||
|
||||
thing->standingslope = slope;
|
||||
if (!thing->player || !(thing->player->pflags & PF_BOUNCING))
|
||||
thing->momz = -P_MobjFlip(thing);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2198,7 +2198,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
{
|
||||
if ((player->charability2 == CA2_SPINDASH) && !(player->pflags & PF_THOKKED) && (player->cmd.buttons & BT_USE) && (FixedHypot(player->mo->momx, player->mo->momy) > (5*player->mo->scale)))
|
||||
player->pflags |= PF_SPINNING;
|
||||
else
|
||||
else if (!(player->pflags & PF_STARTDASH))
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
}
|
||||
|
||||
|
@ -2217,7 +2217,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
player->skidtime = TICRATE;
|
||||
player->mo->tics = -1;
|
||||
}
|
||||
else
|
||||
else if (!player->skidtime)
|
||||
player->pflags &= ~PF_GLIDING;
|
||||
}
|
||||
else if (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||
|
@ -2268,7 +2268,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
}
|
||||
else if (player->charability2 == CA2_GUNSLINGER && player->panim == PA_ABILITY2)
|
||||
;
|
||||
else if (player->pflags & PF_JUMPED || player->powers[pw_tailsfly] || player->mo->state-states == S_PLAY_FLY_TIRED)
|
||||
else if (player->panim != PA_IDLE && player->panim != PA_WALK && player->panim != PA_RUN && player->panim != PA_DASH)
|
||||
{
|
||||
if (player->cmomx || player->cmomy)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue