| 508 | } |
| 509 | |
| 510 | Maybe<HitType> Player::queryHit(DamageSource const& source) const { |
| 511 | if (!inWorld() || isDead() || m_isAdmin || isTeleporting() || m_statusController->statPositive("invulnerable")) |
| 512 | return {}; |
| 513 | |
| 514 | if (m_tools->queryShieldHit(source)) |
| 515 | return HitType::ShieldHit; |
| 516 | |
| 517 | if (source.intersectsWithPoly(world()->geometry(), m_movementController->collisionBody())) |
| 518 | return HitType::Hit; |
| 519 | |
| 520 | return {}; |
| 521 | } |
| 522 | |
| 523 | Maybe<PolyF> Player::hitPoly() const { |
| 524 | return m_movementController->collisionBody(); |
nothing calls this directly
no test coverage detected