Core/Unit: 2170541a51 followup

use true as default value since pretty much all the script calls will expect that
This commit is contained in:
ccrs authored and Aokromes committed 2017-04-28 12:57:38 +02:00
1 parent 1a1fb6712c
commit a17849bcfe
18 files changed
+35 -34

No files matched your search

+5 -4
View File
@@ -1888,7 +1888,7 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
return; // ignore ranged case
if (GetTypeId() == TYPEID_UNIT && !HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED))
SetFacingToObject(victim); // update client side facing to face the target (prevents visual glitches when casting untargeted spells)
SetFacingToObject(victim, false); // update client side facing to face the target (prevents visual glitches when casting untargeted spells)
// melee attack spell cast at main hand attack only - no normal melee dmg dealt
if (attType == BASE_ATTACK && m_currentSpells[CURRENT_MELEE_SPELL] && !extra)
@@ -1936,7 +1936,7 @@ void Unit::FakeAttackerStateUpdate(Unit* victim, WeaponAttackType attType /*= BA
return; // ignore ranged case
if (GetTypeId() == TYPEID_UNIT && !HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED))
SetFacingToObject(victim); // update client side facing to face the target (prevents visual glitches when casting untargeted spells)
SetFacingToObject(victim, false); // update client side facing to face the target (prevents visual glitches when casting untargeted spells)
CalcDamageInfo damageInfo;
damageInfo.attacker = this;
@@ -16614,7 +16614,8 @@ void Unit::SetInFront(WorldObject const* target)
void Unit::SetFacingTo(float ori, bool force)
{
if (!force && !IsStopped())
// do not face when already moving
if (!force && (!IsStopped() || !movespline->Finalized()))
return;
Movement::MoveSplineInit init(this);
@@ -16628,7 +16629,7 @@ void Unit::SetFacingTo(float ori, bool force)
void Unit::SetFacingToObject(WorldObject const* object, bool force)
{
// do not face when already moving
if (!force && !IsStopped())
if (!force && (!IsStopped() || !movespline->Finalized()))
return;
/// @todo figure out under what conditions creature will move towards object instead of facing it where it currently is.