---------------------------------------------- GET LATENCY -----------------------------------------------
| 87 | } |
| 88 | //---------------------------------------------- GET LATENCY ----------------------------------------------- |
| 89 | int GameImpl::getLatency() const |
| 90 | { |
| 91 | // Returns the real latency values |
| 92 | if ( !this->isMultiplayer() ) |
| 93 | return BWAPI::Latency::SinglePlayer; |
| 94 | |
| 95 | if ( this->isBattleNet() ) |
| 96 | { |
| 97 | switch(BW::BWDATA::Latency) |
| 98 | { |
| 99 | case 0: |
| 100 | return BWAPI::Latency::BattlenetLow; |
| 101 | case 1: |
| 102 | return BWAPI::Latency::BattlenetMedium; |
| 103 | case 2: |
| 104 | return BWAPI::Latency::BattlenetHigh; |
| 105 | default: |
| 106 | return BWAPI::Latency::BattlenetLow; |
| 107 | } |
| 108 | } |
| 109 | else |
| 110 | { |
| 111 | switch(BW::BWDATA::Latency) |
| 112 | { |
| 113 | case 0: |
| 114 | return BWAPI::Latency::LanLow; |
| 115 | case 1: |
| 116 | return BWAPI::Latency::LanMedium; |
| 117 | case 2: |
| 118 | return BWAPI::Latency::LanHigh; |
| 119 | default: |
| 120 | return BWAPI::Latency::LanLow; |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | //--------------------------------------------- GET FRAME COUNT -------------------------------------------- |
| 125 | int GameImpl::getFrameCount() const |
| 126 | { |