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

Method entityQuery

source/game/StarEntityMap.cpp:159–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159List<EntityPtr> EntityMap::entityQuery(RectF const& boundBox, EntityFilter const& filter) const {
160 List<EntityPtr> values;
161 forEachEntity(boundBox, [&](EntityPtr const& entity) {
162 if (!filter || filter(entity))
163 values.append(entity);
164 });
165 return values;
166}
167
168List<EntityPtr> EntityMap::entitiesAt(Vec2F const& pos, EntityFilter const& filter) const {
169 auto entityList = entityQuery(RectF::withCenter(pos, {0, 0}), filter);

Callers 7

validateEdgeMethod · 0.45
clearTileEntitiesMethod · 0.45
reapplyBiomeMethod · 0.45
lightLevelFunction · 0.45
queueUpdatePacketsMethod · 0.45
unloadSectorToLevelMethod · 0.45
syncSectorMethod · 0.45

Calls 2

filterFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected