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

Method isVisible

bwapi/Shared/UnitShared.cpp:618–632  ·  view source on GitHub ↗

--------------------------------------------- IS VISIBLE -------------------------------------------------

Source from the content-addressed store, hash-verified

616 }
617 //--------------------------------------------- IS VISIBLE -------------------------------------------------
618 bool UnitImpl::isVisible(Player player) const
619 {
620 if ( player )
621 return self->isVisible[player->getID()];
622
623 if ( Broodwar->self() ) // isVisible for current player
624 return self->isVisible[Broodwar->self()->getID()];
625
626 for(int i = 0; i < 9; ++i)
627 {
628 if (self->isVisible[i])
629 return true;
630 }
631 return false;
632 }
633 //--------------------------------------------- IS TARGETABLE ----------------------------------------------
634 bool UnitImpl::isTargetable() const
635 {

Callers 7

canAccessMethod · 0.95
canBuildHereFunction · 0.45
canTargetUnitFunction · 0.45
drawVisibilityDataFunction · 0.45
onStartMethod · 0.45
onStartMethod · 0.45
updateMethod · 0.45

Calls 2

getIDMethod · 0.45
selfMethod · 0.45

Tested by 3

onStartMethod · 0.36
onStartMethod · 0.36
updateMethod · 0.36