compact host array before game start
This commit is contained in:
parent
a56b6cbbac
commit
753f3e251f
1 changed files with 11 additions and 0 deletions
|
@ -1797,6 +1797,17 @@ void NetworkServerStartGame()
|
|||
// Slot 0 is the server!
|
||||
NetLocalPlayerNumber = Hosts[0].PlyNr;
|
||||
|
||||
for (int i = 0; i < PlayerMax;) {
|
||||
if (Hosts[i].IsValid()) {
|
||||
i++;
|
||||
} else {
|
||||
for (int j = i; j < PlayerMax - 1; j++) {
|
||||
Hosts[j] = Hosts[j + 1];
|
||||
}
|
||||
Hosts[PlayerMax - 1].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the final config message:
|
||||
CInitMessage_Config message;
|
||||
for (int i = 0; i < PlayerMax; ++i) {
|
||||
|
|
Loading…
Add table
Reference in a new issue