MCPcopy Create free account
hub / github.com/demoth/jake2 / resetClients

Method resetClients

server/src/main/java/jake2/server/SV_MAIN.java:959–970  ·  view source on GitHub ↗

Resets the clients, use when maxclients.value is changed

()

Source from the content-addressed store, hash-verified

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

Callers 2

SV_MAINMethod · 0.95
SV_Map_fMethod · 0.95

Calls 4

SV_FinalMessageMethod · 0.95
getInstanceMethod · 0.95
VariableValueMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected