Core/Creatures: tempoarily disable creature replacements until it has been ported to a movement generator

This commit is contained in:
Ovalord committed 2018-01-22 11:26:53 +01:00
1 parent 09c6ed8d1e
commit 4b6c4033c9
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -398,7 +398,7 @@ void CreatureAI::CheckRepositionRequirements()
victimPos.Relocate(victim->GetPosition());
// If we are closer than 50% of the combat reach we are going to reposition ourself
if (me->GetDistance(victimPos) < CalculatePct(me->GetCombatReach(), 50))
if ((me->GetExactDist(victimPos) - me->GetCombatReach()) < CalculatePct(me->GetCombatReach(), 50))
me->MoveAdvanceTo(victim);
}
}
@@ -632,7 +632,7 @@ void Creature::Update(uint32 diff)
if (diff >= m_advanceMovementTime)
{
AI()->CheckRepositionRequirements();
// AI()->CheckRepositionRequirements();
m_advanceMovementTime = 3000;
}
else
+2 -2
View File
@@ -500,8 +500,8 @@ void Unit::MoveAdvanceTo(Unit* target)
Movement::MoveSplineInit init(this);
init.MoveTo(x, y, z, true, false);
// Beasts move backwards instead of turning arround
if (ToCreature() && ToCreature()->GetCreatureTemplate()->type == CREATURE_TYPE_BEAST)
// Creatures except humanoids move backwards instead of turning arround
if (ToCreature() && ToCreature()->GetCreatureTemplate()->type != CREATURE_TYPE_HUMANOID)
init.SetOrientationFixed(true);
init.Launch();