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
+9 -9
View File
@@ -367,18 +367,18 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(grid != NULL);
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());
}
else
{
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)
{
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());
}
else
{
sLog.outStaticDebug("Active object nearby triggers loading of grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), GetId());
}
ResetGridExpiry(*grid, 0.1f);
grid->SetGridState(GRID_STATE_ACTIVE);
}