Core/Map: Log grid loading only if the grid was not already active
--HG-- branch : trunk
This commit is contained in:
@@ -367,18 +367,18 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
|||||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
||||||
ASSERT(grid != NULL);
|
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
|
// refresh grid state & timer
|
||||||
if (grid->GetGridState() != GRID_STATE_ACTIVE)
|
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);
|
ResetGridExpiry(*grid, 0.1f);
|
||||||
grid->SetGridState(GRID_STATE_ACTIVE);
|
grid->SetGridState(GRID_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user