mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(Core/CreatureAI): revert NPC repositioning and path system (temporarily) (#4274)
This commit is contained in:
@@ -85,11 +85,9 @@ public:
|
||||
if (para && strcmp(para, "true") == 0)
|
||||
useStraightPath = true;
|
||||
|
||||
bool useRaycast = false;
|
||||
if (para && (strcmp(para, "line") == 0 || strcmp(para, "ray") == 0 || strcmp(para, "raycast") == 0))
|
||||
{
|
||||
useRaycast = true;
|
||||
}
|
||||
bool useStraightLine = false;
|
||||
if (para && strcmp(para, "line") == 0)
|
||||
useStraightLine = true;
|
||||
|
||||
// unit locations
|
||||
float x, y, z;
|
||||
@@ -98,12 +96,11 @@ public:
|
||||
// path
|
||||
PathGenerator path(target);
|
||||
path.SetUseStraightPath(useStraightPath);
|
||||
path.SetUseRaycast(useRaycast);
|
||||
bool result = path.CalculatePath(x, y, z, false);
|
||||
|
||||
Movement::PointsArray const& pointPath = path.GetPath();
|
||||
handler->PSendSysMessage("%s's path to %s:", target->GetName().c_str(), player->GetName().c_str());
|
||||
handler->PSendSysMessage("Building: %s", useStraightPath ? "StraightPath" : useRaycast ? "Raycast" : "SmoothPath");
|
||||
handler->PSendSysMessage("Building: %s", useStraightPath ? "StraightPath" : useStraightLine ? "Raycast" : "SmoothPath");
|
||||
handler->PSendSysMessage("Result: %s - Length: " SZFMTD " - Type: %u", (result ? "true" : "false"), pointPath.size(), path.GetPathType());
|
||||
|
||||
G3D::Vector3 const& start = path.GetStartPosition();
|
||||
|
||||
Reference in New Issue
Block a user