Core/Map: Log grid loading only if the grid was not already active

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-09-17 04:15:42 +02:00
parent 7bac6c16be
commit f12a61f9f4
+3 -3
View File
@@ -367,6 +367,9 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(grid != NULL);
// refresh grid state & timer
if (grid->GetGridState() != GRID_STATE_ACTIVE)
{
if (player)
{
sLog.outStaticDebug("Player %s enter cell[%u,%u] triggers loading of grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), GetId());
@@ -376,9 +379,6 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
sLog.outStaticDebug("Active object nearby triggers loading of grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), GetId());
}
// refresh grid state & timer
if (grid->GetGridState() != GRID_STATE_ACTIVE)
{
ResetGridExpiry(*grid, 0.1f);
grid->SetGridState(GRID_STATE_ACTIVE);
}