mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +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:
@@ -303,8 +303,8 @@ bool MapMgr::ExistMapAndVMap(uint32 mapid, float x, float y)
|
||||
{
|
||||
GridCoord p = Acore::ComputeGridCoord(x, y);
|
||||
|
||||
int gx = 63 - p.x_coord;
|
||||
int gy = 63 - p.y_coord;
|
||||
int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord;
|
||||
int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord;
|
||||
|
||||
return Map::ExistMap(mapid, gx, gy) && Map::ExistVMap(mapid, gx, gy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user