| 433 | } |
| 434 | |
| 435 | void Projectile::setSourceEntity(EntityId source, bool trackSource) { |
| 436 | m_sourceEntity = source; |
| 437 | m_trackSourceEntity = trackSource; |
| 438 | if (inWorld()) { |
| 439 | if (auto sourceEntity = world()->entity(source)) { |
| 440 | m_lastEntityPosition = sourceEntity->position(); |
| 441 | if (!m_damageTeam) |
| 442 | setTeam(sourceEntity->getTeam()); |
| 443 | } else { |
| 444 | m_sourceEntity = NullEntityId; |
| 445 | m_trackSourceEntity = false; |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | float Projectile::powerMultiplier() const { |
| 451 | return m_powerMultiplier; |
no test coverage detected