| 128 | } |
| 129 | |
| 130 | void DamageManager::pushRemoteHitRequest(RemoteHitRequest const& remoteHitRequest) { |
| 131 | if (remoteHitRequest.destinationConnection() != m_connectionId) |
| 132 | throw StarException("RemoteDamageRequest routed to wrong DamageManager"); |
| 133 | |
| 134 | if (auto causingEntity = m_world->entity(remoteHitRequest.causingEntityId)) { |
| 135 | starAssert(causingEntity->isMaster()); |
| 136 | causingEntity->hitOther(remoteHitRequest.targetEntityId, remoteHitRequest.damageRequest); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void DamageManager::pushRemoteDamageRequest(RemoteDamageRequest const& remoteDamageRequest) { |
| 141 | if (remoteDamageRequest.destinationConnection() != m_connectionId) |
no test coverage detected