feat(Core/Movement): port smooth waypoint movement from Cataclysm Preservation Project (#25106)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Kitzunu <Kitzunu@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-23 08:08:14 -05:00
committed by GitHub
parent 3da6e30196
commit 4201acddd5
69 changed files with 844 additions and 386 deletions
+3 -3
View File
@@ -538,9 +538,9 @@ void MotionMaster::MovePath(uint32 path_id, ForcedMovement forcedMovement, PathS
}
Movement::PointsArray points;
for (auto& point : *path)
for (auto const& node : path->Nodes)
{
points.push_back(G3D::Vector3(point.second.x, point.second.y, point.second.z));
points.push_back(G3D::Vector3(node.X, node.Y, node.Z));
}
// pass the new PointsArray* to the appropriate MoveSplinePath function
@@ -918,7 +918,7 @@ void MotionMaster::MoveWaypoint(uint32 path_id, bool repeatable, PathSource path
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
return;
Mutate(new WaypointMovementGenerator<Creature>(path_id, pathSource, repeatable), MOTION_SLOT_IDLE);
Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable, pathSource), MOTION_SLOT_IDLE);
LOG_DEBUG("movement.motionmaster", "{} ({}) start moving over path(Id:{}, repeatable: {})",
_owner->IsPlayer() ? "Player" : "Creature", _owner->GetGUID().ToString(), path_id, repeatable ? "YES" : "NO");