| 300 | } |
| 301 | |
| 302 | void BattleItem::getSupport() |
| 303 | { |
| 304 | auto tile = tileObject->getOwningTile(); |
| 305 | auto obj = tile->getItemSupportingObject(); |
| 306 | auto restingPosition = |
| 307 | obj->getPosition() + Vec3<float>{0.0f, 0.0f, (float)obj->type->height / 40.0f}; |
| 308 | |
| 309 | bounced = false; |
| 310 | falling = false; |
| 311 | velocity = {0.0f, 0.0f, 0.0f}; |
| 312 | obj->supportedItems = true; |
| 313 | if (position != restingPosition) |
| 314 | { |
| 315 | setPosition(restingPosition); |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | bool BattleItem::findSupport() |
| 320 | { |
no test coverage detected