summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/camera.cpp')
-rw-r--r--gfx/gl/camera.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp
index ff4c91e..06e409e 100644
--- a/gfx/gl/camera.cpp
+++ b/gfx/gl/camera.cpp
@@ -41,9 +41,9 @@ Camera::extentsAtDist(const GlobalDistance dist) const
const auto clampToSeaFloor = [this, dist](GlobalPosition3D target) -> GlobalPosition4D {
target += position;
if (target.z < -1500) {
- const auto diff = target - position;
- const auto limit = -1500 - position.z;
- return {position + (limit * diff) / diff.z, (limit * dist) / diff.z};
+ const CalcPosition3D diff = target - position;
+ const CalcDistance limit = -1500 - position.z;
+ return {position + GlobalPosition3D((limit * diff) / diff.z), (limit * dist) / diff.z};
}
return {target, dist};
};