- Exhumed: Repair what looked like a bug with camera Z clamping.

* Looked wrong, compared to GDX and confirmed.
This commit is contained in:
Mitchell Richters 2022-09-06 22:30:29 +10:00 committed by Christoph Oelckers
parent 36ed1ac1de
commit 7cbe3564ce

View file

@ -272,17 +272,7 @@ void DrawView(double smoothRatio, bool sceneonly)
if (pSector != nullptr)
{
double Z = pSector->ceilingz + 1;
if (Z <= nCamera.Z)
{
Z = pSector->floorz - 1;
if (Z < nCamera.Z)
nCamera.Z = Z;
}
else {
nCamera.Z = Z;
}
nCamera.Z = min(max(nCamera.Z, pSector->ceilingz + 1), pSector->floorz - 1); // std::clamp may fail on this one if sectors are closed.
}
nCamerapan = pan;