| 2144 | } |
| 2145 | |
| 2146 | int calcscoresmatch() // match skill eval |
| 2147 | { |
| 2148 | int sum = 0; |
| 2149 | int nsp = 0; // no score players |
| 2150 | loopv(clients) if(clients[i]->type!=ST_EMPTY) |
| 2151 | { |
| 2152 | if(clients[i]->team < TEAM_CLA_SPECT) |
| 2153 | { |
| 2154 | clientstate &cs = clients[i]->state; |
| 2155 | int cskill = (cs.frags*100 + cs.enemyfire*2 + cs.goodflags*10) - (cs.deaths*50 + cs.friendlyfire*3 + cs.antiflags*15 + cs.teamkills*100 + cs.suicides*100); |
| 2156 | clients[i]->at3_score = cskill; |
| 2157 | sum -= cskill; // match skill sum will be <=0 |
| 2158 | if(cskill < 100) nsp++; |
| 2159 | } |
| 2160 | } |
| 2161 | if(sum > -100 * numplayers() || nsp >= numplayers()/2) return 0; // if at least half have tiny scores or the total isn't enough: indicate random seems best |
| 2162 | return sum; |
| 2163 | } |
| 2164 | |
| 2165 | int calcscores() |
| 2166 | { |
no test coverage detected