- Exhumed: Fix noclipping so the player can clip through anything.

* The `inside()` test is now only performed when noclipping is off.
This commit is contained in:
Mitchell Richters 2023-03-25 21:36:17 +11:00
parent 7410c78ce4
commit 8f748fdb2a

View file

@ -1343,12 +1343,12 @@ static bool doPlayerMovement(Player* const pPlayer)
if (pPlayerSect != pPlayerActor->sector())
ChangeActorSect(pPlayerActor, pPlayerSect);
}
if (inside(pPlayerActor->spr.pos.X, pPlayerActor->spr.pos.Y, pPlayerActor->sector()) != 1)
{
ChangeActorSect(pPlayerActor, spr_sect);
pPlayerActor->spr.pos.XY() = spr_pos.XY();
if (inside(pPlayerActor->spr.pos.X, pPlayerActor->spr.pos.Y, pPlayerActor->sector()) != 1)
{
ChangeActorSect(pPlayerActor, spr_sect);
pPlayerActor->spr.pos.XY() = spr_pos.XY();
}
}
const bool bUnderwater = pPlayerActor->sector()->Flag & kSectUnderwater;