mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
fix(Core/Grid): Implement missing GridUnload setting (#17569)
* Implement GridUnload setting * Minor fixes - Use GetOption instead of deprecated GetBoolDefault. - Added a missing check for instances in LoadMap - Replaced some numbers with global defines * Possible crashfix + minor improvements - Initialized initialOrientation which I had forgotten (likely cause of crash) - Readded a previous check in UpdateSplineMovement - Made i_objectsToRemove and i_worldObjects tos sets as they were previously, instead of unordered_set. * Update worldserver.conf.dist * Fix high CPU usage with preload grid enabled. This should be it.
This commit is contained in:
@@ -567,6 +567,13 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
|
||||
// this code cant be placed inside EscortMovementGenerator, because we cant delete active MoveGen while it is updated
|
||||
SplineHandler handler(this);
|
||||
movespline->updateState(t_diff, handler);
|
||||
// Xinef: Spline was cleared by StopMoving, return
|
||||
if (!movespline->Initialized()) {
|
||||
DisableSpline();
|
||||
return;
|
||||
}
|
||||
|
||||
bool arrived = movespline->Finalized();
|
||||
|
||||
if (movespline->isCyclic())
|
||||
{
|
||||
@@ -582,8 +589,6 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
|
||||
}
|
||||
}
|
||||
|
||||
bool arrived = movespline->Finalized();
|
||||
|
||||
if (arrived)
|
||||
{
|
||||
DisableSpline();
|
||||
|
||||
Reference in New Issue
Block a user