mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 00:23:48 +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:
@@ -48,7 +48,7 @@ namespace Movement
|
||||
|
||||
uint8 m_mode{UninitializedMode};
|
||||
bool cyclic{false};
|
||||
float initialOrientation;
|
||||
float initialOrientation{0.f};
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -198,7 +198,12 @@ namespace Movement
|
||||
}
|
||||
|
||||
/** Returns length of the whole spline. */
|
||||
[[nodiscard]] length_type length() const { return lengths[index_hi];}
|
||||
[[nodiscard]] length_type length() const
|
||||
{
|
||||
if (lengths.empty())
|
||||
return 0;
|
||||
return lengths[index_hi];
|
||||
}
|
||||
/** Returns length between given nodes. */
|
||||
[[nodiscard]] length_type length(index_type first, index_type last) const { return lengths[last] - lengths[first];}
|
||||
[[nodiscard]] length_type length(index_type Idx) const { return lengths[Idx];}
|
||||
|
||||
Reference in New Issue
Block a user