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:
AG
2023-10-27 00:32:15 +02:00
committed by GitHub
parent 23a620007b
commit 79b39f9655
8 changed files with 52 additions and 29 deletions

View File

@@ -768,9 +768,9 @@ private:
void ProcessRelocationNotifies(uint32 diff);
bool i_scriptLock;
std::unordered_set<WorldObject*> i_objectsToRemove;
std::set<WorldObject*> i_objectsToRemove;
std::map<WorldObject*, bool> i_objectsToSwitch;
std::unordered_set<WorldObject*> i_worldObjects;
std::set<WorldObject*> i_worldObjects;
typedef std::multimap<time_t, ScriptAction> ScriptScheduleMap;
ScriptScheduleMap m_scriptSchedule;