| 319 | } |
| 320 | |
| 321 | void Tile::updateCityscapeParameters() |
| 322 | { |
| 323 | if (map.ceaseUpdates) |
| 324 | { |
| 325 | return; |
| 326 | } |
| 327 | height = 0.0f; |
| 328 | overlayHeight = 0.0f; |
| 329 | presentScenery = nullptr; |
| 330 | for (auto &o : ownedObjects) |
| 331 | { |
| 332 | if (o->getType() == TileObject::Type::Scenery) |
| 333 | { |
| 334 | auto mp = std::static_pointer_cast<TileObjectScenery>(o)->getOwner(); |
| 335 | if (!mp->isAlive()) |
| 336 | { |
| 337 | continue; |
| 338 | } |
| 339 | presentScenery = mp; |
| 340 | height = (float)mp->type->height / 16.1f; |
| 341 | overlayHeight = (float)mp->type->overlayHeight / 16.1f; |
| 342 | break; |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | void Tile::updateBattlescapeParameters() |
| 348 | { |
no test coverage detected