Resets the clients, use when maxclients.value is changed
()
| 957 | * Resets the clients, use when maxclients.value is changed |
| 958 | */ |
| 959 | void resetClients() { |
| 960 | SV_FinalMessage("Server restarted", true); |
| 961 | final int max = (int) Cvar.getInstance().VariableValue("maxclients"); |
| 962 | |
| 963 | // Clear all clients |
| 964 | clients = new ArrayList<>(max); |
| 965 | for (int i = 0; i < max; i++) { |
| 966 | client_t cl = new client_t(); |
| 967 | cl.lastcmd = new usercmd_t(); |
| 968 | clients.add(cl); |
| 969 | } |
| 970 | } |
| 971 | |
| 972 | /** |
| 973 | * Only called at quake2.exe startup, not for each game |
no test coverage detected