| 462 | } |
| 463 | |
| 464 | bool Object::checkBroken() { |
| 465 | if (!m_broken && !m_unbreakable) { |
| 466 | auto orientation = currentOrientation(); |
| 467 | if (orientation) { |
| 468 | if (!orientation->anchorsValid(world(), tilePosition())) |
| 469 | m_broken = true; |
| 470 | } else { |
| 471 | m_broken = true; |
| 472 | } |
| 473 | } |
| 474 | return m_broken; |
| 475 | } |
| 476 | |
| 477 | bool Object::shouldDestroy() const { |
| 478 | return m_broken || (m_health.get() <= 0); |
nothing calls this directly
no test coverage detected