mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
fix(Core/Spell): SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER to face caster (#4351)
* fix(Core/Spell): SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER to face caster
* cherry-pick 28353e920b
Co-Authored-By: Meji <2695278+meji46@users.noreply.github.com>
* [[nodiscard]]
* return;
* fix last thing
* build
* Revert "build"
This reverts commit c892cc292f3592c5089840e393b525f74904779b.
* Update Object.h
* Update Object.h
* Update Object.h
Co-authored-by: Meji <2695278+meji46@users.noreply.github.com>
This commit is contained in:
@@ -521,12 +521,16 @@ struct Position
|
||||
|
||||
float GetAngle(const Position* pos) const;
|
||||
[[nodiscard]] float GetAngle(float x, float y) const;
|
||||
float GetAbsoluteAngle(float x, float y) const
|
||||
[[nodiscard]] float GetAbsoluteAngle(float x, float y) const
|
||||
{
|
||||
float dx = x - m_positionX;
|
||||
float dy = y - m_positionY;
|
||||
return NormalizeOrientation(std::atan2(dy, dx));
|
||||
return NormalizeOrientation(std::atan2(
|
||||
static_cast<float>(y - m_positionY),
|
||||
static_cast<float>(x - m_positionX))
|
||||
);
|
||||
}
|
||||
[[nodiscard]] float GetAbsoluteAngle(Position const& pos) const { return GetAbsoluteAngle(pos.m_positionX, pos.m_positionY); }
|
||||
[[nodiscard]] float GetAbsoluteAngle(Position const* pos) const { return GetAbsoluteAngle(*pos); }
|
||||
|
||||
float GetRelativeAngle(const Position* pos) const
|
||||
{
|
||||
return GetAngle(pos) - m_orientation;
|
||||
|
||||
Reference in New Issue
Block a user