From 8f748fdb2a4243d65034329393eda91002a5c0c9 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 25 Mar 2023 21:36:17 +1100 Subject: [PATCH] - Exhumed: Fix noclipping so the player can clip through anything. * The `inside()` test is now only performed when noclipping is off. --- source/games/exhumed/src/player.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index e0ec28abf..7f012f01c 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -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;