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) (ported commit: d63d15c505708d175c52d87afc76cbe4ac59497b)
This commit is contained in:
1 parent
ed8c1830f5
commit
43cc7ce7f3
1 file changed
+4
@@ -2544,6 +2544,8 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
|
||||
destx, desty, destz + halfHeight,
|
||||
destx, desty, destz, -0.5f);
|
||||
|
||||
destz -= halfHeight;
|
||||
|
||||
// collision occured
|
||||
if (col)
|
||||
{
|
||||
@@ -2559,6 +2561,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