|
|
|
@ -150,12 +150,21 @@ do_joingame (struct pkg_joingame *p_jg, _net_addr * addr)
|
|
|
|
|
|
|
|
|
|
team_choose (pl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
strncpy (pl->name, p_jg->name, LEN_PLAYERNAME);
|
|
|
|
|
|
|
|
|
|
if (bman.state == GS_wait) {
|
|
|
|
|
pl->gfx_nr = s_random (gfx.player_gfx_count);
|
|
|
|
|
while (pl->gfx_nr >= gfx.player_gfx_count) {
|
|
|
|
|
pl->gfx_nr -= gfx.player_gfx_count;
|
|
|
|
|
}
|
|
|
|
|
pl->gfx = &gfx.players[pl->gfx_nr];
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
pl->gfx_nr = -1;
|
|
|
|
|
pl->gfx = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pl->state &= (0xFF - (PSF_alife + PSF_playing));
|
|
|
|
|
|
|
|
|
|
/* Reset the network data */
|
|
|
|
|