diff options
author | jackpoz <giacomopoz@gmail.com> | 2016-06-04 15:01:39 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2016-06-04 15:01:39 +0200 |
commit | 1347d7cf7a8656f3db9d8b2f6e6d955e1fa8c129 (patch) | |
tree | c9053f4399c7b7ee087133a1a317198107defa98 /src/common/Collision/DynamicTree.cpp | |
parent | 911bffd20826bf8898ccff02d3315720097a1da6 (diff) |
Core/VMaps: Fix some vmap height edge cases
Fix Map::GetWaterOrGroundLevel() checking dynamic object only in phase 1 instead of current Unit phase.
Improve DynamicMapTree::getHeight() dynamic object check by casting the ray at +0.5f from the passed Z coordinate, this value will be tuned to improve even more the results.
Diffstat (limited to 'src/common/Collision/DynamicTree.cpp')
-rw-r--r-- | src/common/Collision/DynamicTree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp index 5d2e18b1a2e..111606644de 100644 --- a/src/common/Collision/DynamicTree.cpp +++ b/src/common/Collision/DynamicTree.cpp @@ -248,7 +248,7 @@ bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, flo float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const { - G3D::Vector3 v(x, y, z); + G3D::Vector3 v(x, y, z + 0.5f); G3D::Ray r(v, G3D::Vector3(0, 0, -1)); DynamicTreeIntersectionCallback callback(phasemask); impl->intersectZAllignedRay(r, callback, maxSearchDist); |