--------------------------------------------- IS ALLIES WITH ---------------------------------------------
| 75 | } |
| 76 | //--------------------------------------------- IS ALLIES WITH --------------------------------------------- |
| 77 | bool PlayerImpl::isEnemy(const Player player) const |
| 78 | { |
| 79 | if ( !player || this->isNeutral() || player->isNeutral() || this->isObserver() || player->isObserver() ) |
| 80 | return false; |
| 81 | return BW::BWDATA::Game.playerAlliances[index][ static_cast<PlayerImpl*>(player)->getIndex() ] == 0; |
| 82 | } |
| 83 | //--------------------------------------------- IS NEUTRAL ------------------------------------------------- |
| 84 | bool PlayerImpl::isNeutral() const |
| 85 | { |