| 235 | } |
| 236 | |
| 237 | unsigned int ServerItem::getSortFactor() const { |
| 238 | // if null ping we return a 0 player count |
| 239 | unsigned int value = 0; |
| 240 | if (&ping != 0) { |
| 241 | // real players are worth a 1000 |
| 242 | value = ping.rogueCount |
| 243 | + ping.redCount |
| 244 | + ping.greenCount |
| 245 | + ping.blueCount |
| 246 | + ping.purpleCount; |
| 247 | value *= 10000; |
| 248 | // include the lowly observers, 1 point each |
| 249 | value += ping.observerCount; |
| 250 | } |
| 251 | return value; |
| 252 | } |
| 253 | |
| 254 | |
| 255 | bool operator<(const ServerItem& left, const ServerItem& right) { |
no outgoing calls
no test coverage detected