aboutsummaryrefslogtreecommitdiff
path: root/src/common/Collision/DynamicTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Collision/DynamicTree.cpp')
-rw-r--r--src/common/Collision/DynamicTree.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp
index 85dc9d52618..129c1a41878 100644
--- a/src/common/Collision/DynamicTree.cpp
+++ b/src/common/Collision/DynamicTree.cpp
@@ -36,7 +36,7 @@ int CHECK_TREE_PERIOD = 200;
} // namespace
template<> struct PositionTrait< GameObjectModel> {
- static void getPosition(GameObjectModel const& g, G3D::Vector3& p) { p = g.getPosition(); }
+ static void getPosition(GameObjectModel const& g, G3D::Vector3& p) { p = g.GetPosition(); }
};
template<> struct BoundsTrait< GameObjectModel> {
@@ -280,3 +280,9 @@ bool DynamicMapTree::getAreaAndLiquidData(float x, float y, float z, PhaseShift
}
return false;
}
+
+std::span<GameObjectModel const* const> DynamicMapTree::getModelsInGrid(uint32 gx, uint32 gy) const
+{
+ // convert from map tile X/Y to RegularGrid internal representation
+ return impl->getObjects(63 - int32(gx), 63 - int32(gy));
+}