MCPcopy Create free account
hub / github.com/DFHack/dfhack / isUnitInBox

Method isUnitInBox

library/modules/Units.cpp:670–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668}
669
670bool Units::isUnitInBox(df::unit *u, const cuboid &box) {
671 CHECK_NULL_POINTER(u);
672 if (!isActive(u))
673 return false;
674 return box.containsPos(getPosition(u));
675}
676
677bool Units::getUnitsInBox(vector<df::unit *> &units, const cuboid &box, std::function<bool(df::unit *)> filter) {
678 if (!world)

Callers

nothing calls this directly

Calls 1

containsPosMethod · 0.45

Tested by

no test coverage detected