mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
feat(Core/Movement): Allow waypoints to use 0 as valid facing value (#11681)
* feat(Core/Movement): Allow waypoints to use 0 as valid facing value
* cherry-pick commit (4747515872)
Co-Authored-By: Ovah <18347559+Ovahlord@users.noreply.github.com>
* Update SmartScriptMgr.h
* a
* Update SmartAI.cpp
* Update SmartAI.cpp
* Update SmartAI.cpp
* typo
* Update SmartAI.cpp
* Update SmartAI.cpp
* Compile fix
* compile #2
* Update WaypointMgr.h
* Update SmartScriptMgr.h
* compile fix again
Co-authored-by: Ovah <18347559+Ovahlord@users.noreply.github.com>
Co-authored-by: MDIC <joshua.lee.betts@gmail.com>
This commit is contained in:
@@ -257,9 +257,9 @@ void SmartAI::PausePath(uint32 delay, bool forced)
|
||||
me->GetMotionMaster()->MoveIdle();//force stop
|
||||
|
||||
auto waypoint = mWayPoints->find(mCurrentWPID);
|
||||
if (float orientation = waypoint->second->o)
|
||||
if (waypoint->second->o.has_value())
|
||||
{
|
||||
me->SetFacingTo(orientation);
|
||||
me->SetFacingTo(waypoint->second->o.has_value());
|
||||
}
|
||||
}
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_PAUSED, nullptr, mCurrentWPID, GetScript()->GetPathId());
|
||||
|
||||
Reference in New Issue
Block a user