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

Method computeVisibleTiles

source/entities/Tile.cpp:1709–1729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1707}
1708
1709void Tile::computeVisibleTiles()
1710{
1711 if(!getGameMap()->getIsFOWActivated())
1712 {
1713 // If the FOW is deactivated, we allow vision for every seat
1714 for(Seat* seat : getGameMap()->getSeats())
1715 notifyVision(seat);
1716
1717 return;
1718 }
1719
1720 if(!isClaimed())
1721 return;
1722
1723 // A claimed tile can see it self and its neighboors
1724 notifyVision(getSeat());
1725 for(Tile* tile : mNeighbors)
1726 {
1727 tile->notifyVision(getSeat());
1728 }
1729}
1730
1731void Tile::setDirtyForAllSeats()
1732{

Callers 1

doMiscUpkeepMethod · 0.45

Calls 2

getIsFOWActivatedMethod · 0.80
notifyVisionMethod · 0.80

Tested by

no test coverage detected