mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user