MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / refreshBorderingTilesOf

Method refreshBorderingTilesOf

source/gamemap/GameMap.cpp:2477–2488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2475}
2476
2477void GameMap::refreshBorderingTilesOf(const std::vector<Tile*>& affectedTiles)
2478{
2479 // Add the tiles which border the affected region to the affectedTiles vector since they may need to have their meshes changed.
2480 std::vector<Tile*> borderTiles = tilesBorderedByRegion(affectedTiles);
2481
2482 borderTiles.insert(borderTiles.end(), affectedTiles.begin(), affectedTiles.end());
2483
2484 // Loop over all the affected tiles and force them to examine their neighbors. This allows
2485 // them to switch to a mesh with fewer polygons if some are hidden by the neighbors, etc.
2486 for (Tile* tile : borderTiles)
2487 tile->refreshMesh();
2488}
2489
2490std::vector<Tile*> GameMap::getBuildableTilesForPlayerInArea(int x1, int y1, int x2, int y2,
2491 Player* player)

Callers 1

processMessageMethod · 0.80

Calls 1

refreshMeshMethod · 0.80

Tested by

no test coverage detected