| 207 | } |
| 208 | |
| 209 | void TileObjectBattleUnit::removeFromMap() |
| 210 | { |
| 211 | bool requireRecalc = owningTile != nullptr; |
| 212 | std::set<Tile *> prevIntersectingTiles; |
| 213 | for (auto &t : intersectingTiles) |
| 214 | { |
| 215 | prevIntersectingTiles.insert(t); |
| 216 | } |
| 217 | |
| 218 | TileObject::removeFromMap(); |
| 219 | if (requireRecalc) |
| 220 | { |
| 221 | for (auto &t : intersectingTiles) |
| 222 | { |
| 223 | prevIntersectingTiles.erase(t); |
| 224 | } |
| 225 | for (auto &t : prevIntersectingTiles) |
| 226 | { |
| 227 | t->updateBattlescapeUnitPresent(); |
| 228 | } |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | void TileObjectBattleUnit::setPosition(Vec3<float> newPosition) |
| 233 | { |
nothing calls this directly
no test coverage detected