mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- Exhumed: Repair what looked like a bug with camera Z clamping.
* Looked wrong, compared to GDX and confirmed.
This commit is contained in:
parent
36ed1ac1de
commit
7cbe3564ce
1 changed files with 1 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue