| 317 | } |
| 318 | |
| 319 | bool BattleItem::findSupport() |
| 320 | { |
| 321 | auto tile = tileObject->getOwningTile(); |
| 322 | auto obj = tile->getItemSupportingObject(); |
| 323 | if (!obj) |
| 324 | { |
| 325 | return false; |
| 326 | } |
| 327 | auto restingPosition = |
| 328 | obj->getPosition() + Vec3<float>{0.0f, 0.0f, (float)obj->type->height / 40.0f}; |
| 329 | |
| 330 | if (position.z > restingPosition.z) |
| 331 | { |
| 332 | return false; |
| 333 | } |
| 334 | |
| 335 | return true; |
| 336 | } |
| 337 | |
| 338 | void BattleItem::tryCollapse() |
| 339 | { |
no test coverage detected