Maybe fix some netcode ![Wink](images/smiley_icons/icon_wink.gif)
if (j < 0) { // not in the game
if (netgameoperationmode == 0) {
if (numplayers == nethostplayers) {
packbuf[0] = MSG_RSP_GAMEFULL;
i = 1;
debugprintf("responding MSG_RSP_GAMEFULL");
} else {
i = 0;
j = netuniqueidtoken++;
// broadcast the joining of the new player to the rest of the team
packbuf[0] = 6; // some game-level message specifically used at this point for joiners
packbuf[1] = j&255;
packbuf[2] = (j>>8)&255;
sendpacket(-1,packbuf,3);
// now add the new player to our game
multiaddrtostring(&addr, packbuf, 255);
multiaddplayer(packbuf, j);
initprintf("A player just joined.\n");
}
} else {
packbuf[0] = MSG_RSP_GAMEINPROG;
i = 1;
debugprintf("responding MSG_RSP_GAMEINPROG");
}
}