adspartan: : maptile: make sure extents are there and up to date when call…

…ing intersect
62d27ccbbd
This commit is contained in:
T1ti
2024-08-31 07:39:40 +02:00
parent e6d1ac3259
commit f9007a2b08
2 changed files with 3 additions and 1 deletions

View File

@@ -440,6 +440,8 @@ bool MapTile::intersect (math::ray const& ray, selection_result* results) const
return false;
}
recalcExtents();
if (!ray.intersect_bounds(_extents[0], _extents[1]))
{
return false;

View File

@@ -101,7 +101,7 @@ public:
std::atomic<bool> changed;
bool intersect (math::ray const&, selection_result*) const;
bool intersect (math::ray const&, selection_result*);
bool GetVertex(float x, float z, glm::vec3 *V);