| 517 | } |
| 518 | |
| 519 | List<DamageSource> Vehicle::damageSources() const { |
| 520 | List<DamageSource> sources; |
| 521 | for (auto const& p : m_damageSources) { |
| 522 | if (p.second.enabled.get()) { |
| 523 | DamageSource damageSource = p.second.damageSource; |
| 524 | |
| 525 | if (p.second.attachToPart) { |
| 526 | Mat3F partTransformation = m_networkedAnimator.finalPartTransformation(p.second.attachToPart.get()); |
| 527 | damageSource.damageArea.call([partTransformation](auto& da) { da.transform(partTransformation); }); |
| 528 | } |
| 529 | |
| 530 | damageSource.team = m_damageTeam.get(); |
| 531 | damageSource.sourceEntityId = entityId(); |
| 532 | |
| 533 | sources.append(std::move(damageSource)); |
| 534 | } |
| 535 | } |
| 536 | return sources; |
| 537 | } |
| 538 | |
| 539 | size_t Vehicle::movingCollisionCount() const { |
| 540 | return m_movingCollisions.size(); |
nothing calls this directly
no test coverage detected