next try to fix this illness problem, that the bombs and range just disapear.

origin
stpohle 22 years ago
parent fb8b39cd05
commit 6acb63e104

@ -1,4 +1,4 @@
/* $Id: player.c,v 1.61 2004/01/04 22:15:41 stpohle Exp $ /* $Id: player.c,v 1.62 2004/01/06 00:03:01 stpohle Exp $
* player.c - everything what have to do with the player */ * player.c - everything what have to do with the player */
#include <SDL.h> #include <SDL.h>
@ -715,13 +715,13 @@ player_set_ilness (_player * p, int t)
p->speed = ILL_FASTSPEED; p->speed = ILL_FASTSPEED;
break; break;
case PI_range: case PI_range:
if (p->ill[type].to == 0) if (p->ill[type].to <= 0.0f)
p->ill[type].datai = p->range; p->ill[type].datai = p->range;
d_printf ("player_set_ilness PI_range %d\n", p->ill[type].datai); d_printf ("player_set_ilness PI_range %d\n", p->ill[type].datai);
p->range = 1; p->range = 1;
break; break;
case PI_nobomb: case PI_nobomb:
if (p->ill[type].to == 0) if (p->ill[type].to <= 0.0f)
p->ill[type].datai = p->bombs_n; p->ill[type].datai = p->bombs_n;
d_printf ("player_set_ilness PI_nobomb %d\n", p->ill[type].datai); d_printf ("player_set_ilness PI_nobomb %d\n", p->ill[type].datai);
p->bombs_n = s_random (2); p->bombs_n = s_random (2);
@ -755,7 +755,7 @@ player_clear_ilness (_player * p, int type)
p->bombs_n = p->ill[type].datai; p->bombs_n = p->ill[type].datai;
break; break;
} }
p->ill[type].to = 0.0; p->ill[type].to = 0.0f;
if (GT_MP) if (GT_MP)
net_game_send_ill (bman.p_nr); net_game_send_ill (bman.p_nr);
bman.updatestatusbar = 1; bman.updatestatusbar = 1;

Loading…
Cancel
Save