Merge fix

This commit is contained in:
kadeshar
2026-03-28 09:54:24 +01:00
393 changed files with 19287 additions and 15957 deletions
+5 -5
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
@@ -879,10 +879,10 @@ void MotionMaster::MoveDistract(uint32 timer)
void MotionMaster::Mutate(MovementGenerator* m, MovementSlot slot)
{
bool const delayed = (_cleanFlag & MMCF_UPDATE);
while (MovementGenerator* curr = Impl[slot])
{
bool delayed = (_top == slot && (_cleanFlag & MMCF_UPDATE));
// clear slot AND decrease top immediately to avoid crashes when referencing null top in DirectDelete
Impl[slot] = nullptr;
while (!empty() && !top())
@@ -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");