mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 11:34:07 -04:00
Core/Maps: Remove old debugging code
This commit is contained in:
@@ -35,8 +35,6 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "Group.h"
|
||||
|
||||
extern GridState* si_GridStates[]; // debugging code, should be deleted some day
|
||||
|
||||
MapManager::MapManager()
|
||||
{
|
||||
i_gridCleanUpDelay = sWorld->getIntConfig(CONFIG_INTERVAL_GRIDCLEAN);
|
||||
@@ -51,13 +49,6 @@ void MapManager::Initialize()
|
||||
{
|
||||
Map::InitStateMachine();
|
||||
|
||||
// debugging code, should be deleted some day
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_GRID_STATE; ++i)
|
||||
i_GridStates[i] = si_GridStates[i];
|
||||
|
||||
i_GridStateErrorCount = 0;
|
||||
}
|
||||
int num_threads(sWorld->getIntConfig(CONFIG_NUMTHREADS));
|
||||
// Start mtmaps
|
||||
if (m_updater.activate(num_threads) == -1)
|
||||
@@ -73,31 +64,6 @@ void MapManager::InitializeVisibilityDistanceInfo()
|
||||
(*iter).second->InitVisibilityDistance();
|
||||
}
|
||||
|
||||
// debugging code, should be deleted some day
|
||||
void MapManager::checkAndCorrectGridStatesArray()
|
||||
{
|
||||
bool ok = true;
|
||||
for (int i=0; i<MAX_GRID_STATE; i++)
|
||||
{
|
||||
if (i_GridStates[i] != si_GridStates[i])
|
||||
{
|
||||
sLog->outError("MapManager::checkGridStates(), GridState: si_GridStates is currupt !!!");
|
||||
ok = false;
|
||||
si_GridStates[i] = i_GridStates[i];
|
||||
}
|
||||
#ifdef TRINITY_DEBUG
|
||||
// inner class checking only when compiled with debug
|
||||
if (!si_GridStates[i]->checkMagic())
|
||||
{
|
||||
ok = false;
|
||||
si_GridStates[i]->setMagic();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (!ok)
|
||||
++i_GridStateErrorCount;
|
||||
}
|
||||
|
||||
Map* MapManager::_createBaseMap(uint32 id)
|
||||
{
|
||||
Map *m = _findMap(id);
|
||||
|
||||
@@ -150,11 +150,6 @@ class MapManager
|
||||
|
||||
MapUpdater * GetMapUpdater() { return &m_updater; }
|
||||
|
||||
private:
|
||||
// debugging code, should be deleted some day
|
||||
void checkAndCorrectGridStatesArray(); // just for debugging to find some memory overwrites
|
||||
GridState* i_GridStates[MAX_GRID_STATE]; // shadow entries to the global array in Map.cpp
|
||||
int i_GridStateErrorCount;
|
||||
private:
|
||||
MapManager();
|
||||
~MapManager();
|
||||
|
||||
Reference in New Issue
Block a user