diff --git a/ChangeLog b/ChangeLog index 03a003f..5327c01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ -$Id: ChangeLog,v 1.127 2009/05/11 20:51:25 stpohle Exp $ +$Id: ChangeLog,v 1.128 2009/10/11 17:14:47 stpohle Exp $ CVS Version =========== +11.10.2009 +- fixed: bug with selecting a player gfx. + 11.5.2009 - got a big patch file from Michel Bernay which fixes: fixed: bug about compute points of the winner in multiplayer mode diff --git a/include/basic.h b/include/basic.h index bdbf6e2..9053862 100644 --- a/include/basic.h +++ b/include/basic.h @@ -1,4 +1,4 @@ -/* $Id: basic.h,v 1.37 2009/10/10 09:43:54 stpohle Exp $ */ +/* $Id: basic.h,v 1.38 2009/10/11 17:14:47 stpohle Exp $ */ /* basic types which we need everywhere */ #ifndef _BC_BASIC_H_ @@ -82,7 +82,7 @@ #define AUTOSTART 20 /* server autostart */ -#define MW_IS_GFX_SELECT(__gfx_nr,__result) for (__result = (MAX_PLAYERS-1); (__result >= 0) && (players[__result].gfx_nr != __gfx_nr); __result--) d_printf ("__result:%d, gfx:%d __gfx:%d\n", __result, players[__result].gfx_nr, __gfx_nr); +#define MW_IS_GFX_SELECT(__gfx_nr,__result) for (__result = (MAX_PLAYERS-1); (__result >= 0) && (players[__result].gfx_nr != __gfx_nr); __result--); #define CUTINT(__x) (__x-floorf(__x)) // cut the integer part off #define postofield(__x) ((int)(rintf(__x))) // position to int with rounding diff --git a/src/debug.c b/src/debug.c index aca2210..a82bced 100644 --- a/src/debug.c +++ b/src/debug.c @@ -70,7 +70,7 @@ void d_playerdetail (char *head) { d_printf ("---------------> %s\n", head); d_printf ("Nr Name GFX Sta Pkt Win kil Team net_flag [Addr]\n"); for (i = 0; i < MAX_PLAYERS; i++) - if (players[i].gfx_nr != -1 ) + // if (players[i].gfx_nr != -1 ) d_printf ("%2d %16s %3d %3d %3d %3d %3d %4d %3d %p[%s:%s]\n",i, players[i].name, players[i].gfx_nr, players[i].state, players[i].points, players[i].wins, players[i].nbrKilled, players[i].team_nr, players[i].net.flags, players[i].net.addr.host, &players[i].net.addr, players[i].net.addr.port); }; diff --git a/src/player.c b/src/player.c index cbec397..2d51c28 100644 --- a/src/player.c +++ b/src/player.c @@ -1,4 +1,4 @@ -/* $Id: player.c,v 1.107 2009/05/11 20:51:25 stpohle Exp $ +/* $Id: player.c,v 1.108 2009/10/11 17:14:47 stpohle Exp $ * player.c - everything what have to do with the player */ #include @@ -874,7 +874,7 @@ player_set_gfx (_player * p, signed char gfx_nr) d_printf ("player_set_gfx: name:%15s from gfx %d to gfx %d.\n", p->name, p->gfx_nr, gfx_nr); p->gfx_nr = gfx_nr; - if (p->gfx_nr < 0 || p->gfx_nr >= MAX_PLAYERS) + if (p->gfx_nr < 0 || p->gfx_nr >= gfx.player_gfx_count) p->gfx_nr = -1; if (p->gfx_nr == -1) { p->gfx = NULL;