Core/Spells: Replace MovePosition by MovePositionToFirstCollision in spell dest target handling.

- Solves issues such as being able to summon creatures inside terrain/gameobjects, being able to fall through terrain by using Shadowstep/Feral Charge (Cat), and much more
This commit is contained in:
Trisjdc
2014-05-07 11:58:08 +01:00
parent 3751d547c0
commit cb7668ab5a

View File

@@ -1288,10 +1288,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
dist = objSize + (dist - objSize) * float(rand_norm());
Position pos = dest._position;
if (targetType.GetTarget() == TARGET_DEST_CASTER_FRONT_LEAP)
m_caster->MovePositionToFirstCollision(pos, dist, angle);
else
m_caster->MovePosition(pos, dist, angle);
m_caster->MovePositionToFirstCollision(pos, dist, angle);
dest.Relocate(pos);
break;
@@ -1324,7 +1321,7 @@ void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplici
dist = objSize + (dist - objSize) * float(rand_norm());
Position pos = dest._position;
target->MovePosition(pos, dist, angle);
target->MovePositionToFirstCollision(pos, dist, angle);
dest.Relocate(pos);
break;
@@ -1363,7 +1360,7 @@ void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitT
dist *= float(rand_norm());
Position pos = dest._position;
m_caster->MovePosition(pos, dist, angle);
m_caster->MovePositionToFirstCollision(pos, dist, angle);
dest.Relocate(pos);
break;