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 e3aec8e067
commit ed8ad7abde
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->player)
P_PlayerHitFloor(thing->player, false);
P_PlayerHitFloor(thing->player, !onfloor);
}
// 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 (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)))
player->pflags |= PF_SPINNING;
else if (!(player->pflags & PF_STARTDASH))
player->pflags &= ~PF_SPINNING;
if (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 if (!(player->pflags & PF_STARTDASH))
player->pflags &= ~PF_SPINNING;
}
if (player->pflags & PF_SPINNING)
{