MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / pushRemoteHitRequest

Method pushRemoteHitRequest

source/game/StarDamageManager.cpp:130–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void 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
140void DamageManager::pushRemoteDamageRequest(RemoteDamageRequest const& remoteDamageRequest) {
141 if (remoteDamageRequest.destinationConnection() != m_connectionId)

Callers 2

handleIncomingPacketsMethod · 0.80
handleIncomingPacketsMethod · 0.80

Calls 5

StarExceptionClass · 0.85
destinationConnectionMethod · 0.80
isMasterMethod · 0.80
entityMethod · 0.45
hitOtherMethod · 0.45

Tested by

no test coverage detected