Did some testing, needed to fix one more issue with moving surfaces and spinning.

This commit is contained in:
toaster 2019-08-11 14:36:52 +01:00
parent a98bbafbc3
commit f3eb35bb6d
2 changed files with 8 additions and 5 deletions

View file

@ -2884,7 +2884,7 @@ static boolean P_ThingHeightClip(mobj_t *thing)
if (thing->z != oldz) if (thing->z != oldz)
{ {
if (thing->player) if (thing->player)
P_PlayerHitFloor(thing->player, false); P_PlayerHitFloor(thing->player, !onfloor);
} }
// debug: be sure it falls to the floor // debug: be sure it falls to the floor

View file

@ -2194,10 +2194,13 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
if ((clipmomz = !(P_CheckDeathPitCollide(player->mo))) && player->mo->health && !player->spectator) if ((clipmomz = !(P_CheckDeathPitCollide(player->mo))) && player->mo->health && !player->spectator)
{ {
if (dorollstuff && (player->charability2 == CA2_SPINDASH) && !(player->pflags & PF_THOKKED) && (player->cmd.buttons & BT_USE) && (FixedHypot(player->mo->momx, player->mo->momy) > (5*player->mo->scale))) if (dorollstuff)
player->pflags |= PF_SPINNING; {
else if (!(player->pflags & PF_STARTDASH)) 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; player->pflags |= PF_SPINNING;
else if (!(player->pflags & PF_STARTDASH))
player->pflags &= ~PF_SPINNING;
}
if (player->pflags & PF_SPINNING) if (player->pflags & PF_SPINNING)
{ {