MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getSortFactor

Method getSortFactor

src/game/ServerItem.cpp:237–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237unsigned 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
255bool operator<(const ServerItem& left, const ServerItem& right) {

Callers 2

operator<Function · 0.80
operator()Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected