Clean up the start of P_CheckQuicksand

This commit is contained in:
spherallic 2022-10-08 10:58:09 +02:00
parent 73e2d8d1bc
commit c92a371aa9

View file

@ -2814,14 +2814,13 @@ static void P_CheckQuicksand(player_t *player)
fixed_t sinkspeed;
fixed_t topheight, bottomheight;
if (!(player->mo->subsector->sector->ffloors &&
((!(player->mo->eflags & MFE_VERTICALFLIP) && player->mo->momz <= 0) ||
(player->mo->eflags & MFE_VERTICALFLIP && player->mo->momz >= 0))))
if (!(player->mo->subsector->sector->ffloors && P_MobjFlip(player->mo)*player->mo->momz <= 0))
return;
for (rover = player->mo->subsector->sector->ffloors; rover; rover = rover->next)
{
if (!(rover->fofflags & FOF_EXISTS)) continue;
if (!(rover->fofflags & FOF_EXISTS))
continue;
if (!(rover->fofflags & FOF_QUICKSAND))
continue;