Core/Spells: Fixed spells using MovePositionToFirstCollision for selecting target position getting Z coord offset by caster or target collision height (depending on spell target type)

(cherry picked from commit d63d15c505)
This commit is contained in:
Shauren
2019-02-20 18:35:35 +01:00
parent dba7e2507f
commit 7a413ae543

View File

@@ -3056,6 +3056,8 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
destx, desty, destz + halfHeight,
destx, desty, destz, -0.5f);
destz -= halfHeight;
// collision occured
if (col)
{
@@ -3071,6 +3073,8 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
destx, desty, destz + halfHeight,
destx, desty, destz, -0.5f);
destz -= halfHeight;
// Collided with a gameobject
if (col)
{