MCPcopy Create free account
hub / github.com/bwapi/bwapi / canAccessDetected

Method canAccessDetected

bwapi/BWAPI/Source/BWAPI/UnitImpl.cpp:189–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187 return false;
188 }
189 bool UnitImpl::canAccessDetected() const
190 {
191 if (!canAccess())
192 return false;
193 if (this->_getPlayer == BroodwarImpl.self())
194 return true;
195 if (BroodwarImpl.isFlagEnabled(Flag::CompleteMapInformation))
196 return true;
197
198 // neutral units visible during AIModule::onStart
199 if (Broodwar->getFrameCount() == 0)
200 if (this->_getType.isNeutral())
201 return true;
202
203 return self->isDetected;
204 }
205
206 //returns true if canAccess() is true and the unit is owned by self (or complete map info is turned on)
207 bool UnitImpl::canAccessInside() const

Callers

nothing calls this directly

Calls 4

selfMethod · 0.45
isFlagEnabledMethod · 0.45
getFrameCountMethod · 0.45
isNeutralMethod · 0.45

Tested by

no test coverage detected