summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index 86b9152..1f6768a 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -227,8 +227,7 @@ GeoData::intersectRay(const Ray<GlobalPosition3D> & ray, FaceHandle face) const
{
GeoData::IntersectionResult out;
walkUntil(PointFace {ray.start, face},
- ray.start.xy()
- + GlobalPosition2D(ray.direction.xy() * RelativePosition2D(upperExtent.xy() - lowerExtent.xy())),
+ ray.start.xy() + (ray.direction.xy() * RelativePosition2D(upperExtent.xy() - lowerExtent.xy())),
[&out, &ray, this](FaceHandle face) {
BaryPosition bari {};
RelativeDistance dist {};
@@ -436,7 +435,7 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip)
const auto extrusion
= extrusionDir * std::max(0.F, RelativeDistance(limit - p1.z) / extrusionDir.z);
- return p1 + GlobalPosition3D(extrusion);
+ return p1 + extrusion;
};
return std::make_pair(doExtrusion(-2, lowerExtent.z - 100), doExtrusion(2, upperExtent.z + 100));
});