diff options
| author | Subv <s.v.h21@hotmail.com> | 2012-08-22 17:39:25 -0500 |
|---|---|---|
| committer | Subv <s.v.h21@hotmail.com> | 2012-08-22 17:39:25 -0500 |
| commit | 5061fa626a72fa7c2632a4b2cef318633c56d85b (patch) | |
| tree | 0befdc164e7bcee1f4a61444f34608580711a500 /src/server | |
| parent | dc95ce61b46ce2d542ee4c4dbdf35a9e854c4316 (diff) | |
Core/Mmaps:
* Unload instanced mmaps before unloading the base map
* Load only mmaps for base map on map creation
* Extractor: Somewhat speed improvement
Diffstat (limited to 'src/server')
| -rwxr-xr-x | src/server/game/Maps/Map.cpp | 9 | ||||
| -rwxr-xr-x | src/server/game/Movement/MotionMaster.h | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index b38f89eab8f..5e3699146f2 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -71,8 +71,8 @@ Map::~Map() if (!m_scriptSchedule.empty()) sScriptMgr->DecreaseScheduledScriptCount(m_scriptSchedule.size()); - MMAP::MMapFactory::createOrGetMMapManager()->unloadMap(GetId()); MMAP::MMapFactory::createOrGetMMapManager()->unloadMapInstance(GetId(), i_InstanceId); + MMAP::MMapFactory::createOrGetMMapManager()->unloadMap(GetId()); } bool Map::ExistMap(uint32 mapid, int gx, int gy) @@ -206,9 +206,12 @@ void Map::LoadMap(int gx, int gy, bool reload) void Map::LoadMapAndVMap(int gx, int gy) { LoadMap(gx, gy); - LoadMMap(gx, gy); + // Only load the data for the base map if (i_InstanceId == 0) - LoadVMap(gx, gy); // Only load the data for the base map + { + LoadVMap(gx, gy); + LoadMMap(gx, gy); + } } void Map::InitStateMachine() diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index f10c6569cad..918896a5a81 100755 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -154,13 +154,13 @@ class MotionMaster //: private std::stack<MovementGenerator *> void MoveFleeing(Unit* enemy, uint32 time = 0); void MovePoint(uint32 id, const Position &pos) { MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ); } - void MovePoint(uint32 id, float x, float y, float z, bool generatePath = false); + void MovePoint(uint32 id, float x, float y, float z, bool generatePath = true); // These two movement types should only be used with creatures having landing/takeoff animations void MoveLand(uint32 id, Position const& pos); void MoveTakeoff(uint32 id, Position const& pos); - void MoveCharge(float x, float y, float z, float speed = SPEED_CHARGE, uint32 id = EVENT_CHARGE, bool generatePath = false); + void MoveCharge(float x, float y, float z, float speed = SPEED_CHARGE, uint32 id = EVENT_CHARGE, bool generatePath = true); void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ); void MoveJumpTo(float angle, float speedXY, float speedZ); void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = 0); |
