| 1129 | } |
| 1130 | |
| 1131 | Maybe<HitType> Object::queryHit(DamageSource const& source) const { |
| 1132 | if (!m_config->smashable || !inWorld() || m_health.get() <= 0.0f || m_unbreakable) |
| 1133 | return {}; |
| 1134 | |
| 1135 | if (source.intersectsWithPoly(world()->geometry(), hitPoly().get())) |
| 1136 | return HitType::Hit; |
| 1137 | |
| 1138 | return {}; |
| 1139 | } |
| 1140 | |
| 1141 | Maybe<PolyF> Object::hitPoly() const { |
| 1142 | auto poly = volume(); |
nothing calls this directly
no test coverage detected