| 302 | } |
| 303 | |
| 304 | Maybe<HitType> Npc::queryHit(DamageSource const& source) const { |
| 305 | if (!inWorld() || !m_statusController->resourcePositive("health") || m_statusController->statPositive("invulnerable")) |
| 306 | return {}; |
| 307 | |
| 308 | if (m_tools->queryShieldHit(source)) |
| 309 | return HitType::ShieldHit; |
| 310 | |
| 311 | if (source.intersectsWithPoly(world()->geometry(), m_movementController->collisionBody())) |
| 312 | return HitType::Hit; |
| 313 | |
| 314 | return {}; |
| 315 | } |
| 316 | |
| 317 | Maybe<PolyF> Npc::hitPoly() const { |
| 318 | return m_movementController->collisionBody(); |
nothing calls this directly
no test coverage detected