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

Method monitoringRegions

source/game/StarWorldServer.cpp:2512–2518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2510 : clientId(clientId), skyNetVersion(0), weatherNetVersion(0), pendingForward(false), started(false), local(false), admin(false), interpolationTracker(trackerInit) {}
2511
2512List<RectI> WorldServer::ClientInfo::monitoringRegions(EntityMapPtr const& entityMap) const {
2513 return clientState.monitoringRegions([entityMap](EntityId entityId) -> Maybe<RectI> {
2514 if (auto entity = entityMap->entity(entityId))
2515 return RectI::integral(entity->metaBoundBox().translated(entity->position()));
2516 return {};
2517 });
2518}
2519
2520bool WorldServer::ClientInfo::needsDamageNotification(RemoteDamageNotification const& rdn) const {
2521 if (clientId == connectionForEntity(rdn.sourceEntityId) || clientId == connectionForEntity(rdn.damageNotification.targetEntityId))

Callers 5

updateMethod · 0.45
handleIncomingPacketsMethod · 0.45
updateMethod · 0.45
queueUpdatePacketsMethod · 0.45
isVisibleToPlayerMethod · 0.45

Calls 4

entityMethod · 0.45
translatedMethod · 0.45
metaBoundBoxMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected