Core/Units: renamed SetInFront to SetOrientationTowards to clarify its actual functionality and added comments to SetOrientationTowards, SetFacingTo and SetFacingToObject

This commit is contained in:
Ovahlord committed 2020-09-23 20:48:44 +02:00
1 parent 0a480f3ae8
commit c9afa1a6ed
13 files changed
+21 -23

No files matched your search

@@ -197,8 +197,8 @@ public:
++IntroPhase;
break;
case 1:
me->SetInFront(Madrigosa);
Madrigosa->SetInFront(me);
me->SetOrientationTowards(Madrigosa);
Madrigosa->SetOrientationTowards(me);
Madrigosa->AI()->Talk(YELL_MADR_INTRO, me);
IntroPhaseTimer = 9000;
++IntroPhase;
@@ -551,7 +551,7 @@ class spell_alysrazor_turn_monstrosity : public SpellScriptLoader
float angle = 0.0f;
if (Unit* bird = GetCaster()->GetVehicleBase())
{
bird->SetInFront(GetHitUnit());
bird->SetOrientationTowards(GetHitUnit());
angle = bird->GetOrientation();
}
@@ -532,8 +532,8 @@ public:
return 1000;
case 2:
Talk(GEEZLE_SAY_1, Spark);
Spark->SetInFront(me);
me->SetInFront(Spark);
Spark->SetOrientationTowards(me);
me->SetOrientationTowards(Spark);
return 5000;
case 3:
Spark->AI()->Talk(SPARK_SAY_2);
@@ -2505,7 +2505,7 @@ class spell_mimiron_summon_flames_spread : public SpellScriptLoader
void OnHit(SpellEffIndex /*effIndex*/)
{
GetCaster()->SetInFront(GetHitUnit());
GetCaster()->SetOrientationTowards(GetHitUnit());
}
void Register() override
@@ -960,7 +960,7 @@ public:
case 8:
if (arthas && talbot)
{
arthas->SetInFront(me); //The client doesen't update with the new orientation :l
arthas->SetOrientationTowards(me); //The client doesen't update with the new orientation :l
talbot->SetStandState(UNIT_STAND_STATE_STAND);
arthas->AI()->Talk(SAY_LICH_2);
}
@@ -70,8 +70,8 @@ public:
void LockRageclaw(Creature* rageclaw)
{
// pointer check not needed
me->SetInFront(rageclaw);
rageclaw->SetInFront(me);
me->SetOrientationTowards(rageclaw);
rageclaw->SetOrientationTowards(me);
DoCast(rageclaw, SPELL_LEFT_CHAIN, true);
DoCast(rageclaw, SPELL_RIGHT_CHAIN, true);
@@ -406,7 +406,7 @@ public:
player->GroupEventHappens(ESCAPE_FROM_FIREWING_POINT_A, me);
else if (player->GetTeam() == HORDE)
player->GroupEventHappens(ESCAPE_FROM_FIREWING_POINT_H, me);
me->SetInFront(player);
me->SetOrientationTowards(player);
break;
case 30:
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);
+1 -1
View File
@@ -361,7 +361,7 @@ public:
{
if (me->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()) && me->IsWithinDistInMap(player, 30.0f))
{
me->SetInFront(player);
me->SetOrientationTowards(player);
Active = false;
switch (emote)