--------------------------------------------- IS ALLIES WITH ---------------------------------------------
| 68 | } |
| 69 | //--------------------------------------------- IS ALLIES WITH --------------------------------------------- |
| 70 | bool PlayerImpl::isAlly(const Player player) const |
| 71 | { |
| 72 | if ( !player || this->isNeutral() || player->isNeutral() || this->isObserver() || player->isObserver() ) |
| 73 | return false; |
| 74 | return BW::BWDATA::Game.playerAlliances[index][ static_cast<PlayerImpl*>(player)->getIndex() ] != 0; |
| 75 | } |
| 76 | //--------------------------------------------- IS ALLIES WITH --------------------------------------------- |
| 77 | bool PlayerImpl::isEnemy(const Player player) const |
| 78 | { |