problem with selecting a gfx during a running game (only when we just join)

origin
stpohle 21 years ago
parent 77fa552c0a
commit 6244412b9e

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

Loading…
Cancel
Save