--------------------------------------------- IS VISIBLE -------------------------------------------------
| 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 | { |