mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +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:
@@ -70,7 +70,9 @@ void WaypointMgr::Load()
|
||||
float x = fields[2].Get<float>();
|
||||
float y = fields[3].Get<float>();
|
||||
float z = fields[4].Get<float>();
|
||||
float o = fields[5].Get<float>();
|
||||
std::optional<float > o;
|
||||
if (!fields[5].IsNull())
|
||||
o = fields[5].Get<float>();
|
||||
|
||||
Acore::NormalizeMapCoord(x);
|
||||
Acore::NormalizeMapCoord(y);
|
||||
@@ -131,7 +133,9 @@ void WaypointMgr::ReloadPath(uint32 id)
|
||||
float x = fields[1].Get<float>();
|
||||
float y = fields[2].Get<float>();
|
||||
float z = fields[3].Get<float>();
|
||||
float o = fields[4].Get<float>();
|
||||
std::optional<float> o;
|
||||
if (!fields[4].IsNull())
|
||||
o = fields[4].Get<float>();
|
||||
|
||||
Acore::NormalizeMapCoord(x);
|
||||
Acore::NormalizeMapCoord(y);
|
||||
|
||||
@@ -35,7 +35,8 @@ enum WaypointMoveType
|
||||
struct WaypointData
|
||||
{
|
||||
uint32 id;
|
||||
float x, y, z, orientation;
|
||||
float x, y, z;
|
||||
std::optional<float> orientation;
|
||||
uint32 delay;
|
||||
uint32 event_id;
|
||||
uint32 move_type;
|
||||
|
||||
Reference in New Issue
Block a user