| 2475 | } |
| 2476 | |
| 2477 | void 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 | |
| 2490 | std::vector<Tile*> GameMap::getBuildableTilesForPlayerInArea(int x1, int y1, int x2, int y2, |
| 2491 | Player* player) |
no test coverage detected