| 1732 | } |
| 1733 | |
| 1734 | void Seat::notifyBuildingRemovedFromGameMap(Building* building, Tile* tile) |
| 1735 | { |
| 1736 | if(getPlayer() == nullptr) |
| 1737 | return; |
| 1738 | if(!getPlayer()->getIsHuman()) |
| 1739 | return; |
| 1740 | |
| 1741 | if(tile->getX() >= static_cast<int>(mTilesStates.size())) |
| 1742 | { |
| 1743 | OD_LOG_ERR("Tile=" + Tile::displayAsString(tile)); |
| 1744 | return; |
| 1745 | } |
| 1746 | if(tile->getY() >= static_cast<int>(mTilesStates[tile->getX()].size())) |
| 1747 | { |
| 1748 | OD_LOG_ERR("Tile=" + Tile::displayAsString(tile)); |
| 1749 | return; |
| 1750 | } |
| 1751 | |
| 1752 | TileStateNotified& tileState = mTilesStates[tile->getX()][tile->getY()]; |
| 1753 | if(tileState.mBuilding == building) |
| 1754 | tileState.mBuilding = nullptr; |
| 1755 | } |
| 1756 | |
| 1757 | void Seat::tileMarkedDiggingNotifiedToPlayer(Tile* tile, bool isDigSet) |
| 1758 | { |
no test coverage detected