|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* $Id: player.c,v 1.59 2004/01/04 21:14:17 stpohle Exp $
|
|
|
|
|
/* $Id: player.c,v 1.60 2004/01/04 21:58:49 stpohle Exp $
|
|
|
|
|
* player.c - everything what have to do with the player */
|
|
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
@ -689,7 +689,8 @@ player_set_ilness (_player * p, int t)
|
|
|
|
|
else
|
|
|
|
|
type = t;
|
|
|
|
|
|
|
|
|
|
d_printf ("Ilness : %d\n", type);
|
|
|
|
|
type = PI_nobomb;
|
|
|
|
|
d_printf ("Ilness Player %s : Type:%d\n", p->name, type);
|
|
|
|
|
switch (type) {
|
|
|
|
|
case PI_slow:
|
|
|
|
|
if (p->ill[type].to <= 0.0f) {
|
|
|
|
@ -717,11 +718,13 @@ player_set_ilness (_player * p, int t)
|
|
|
|
|
case PI_range:
|
|
|
|
|
if (p->ill[type].to == 0)
|
|
|
|
|
p->ill[type].datai = p->range;
|
|
|
|
|
printf ("player_set_ilness PI_range %d\n", p->ill[type].datai);
|
|
|
|
|
p->range = 1;
|
|
|
|
|
break;
|
|
|
|
|
case PI_nobomb:
|
|
|
|
|
if (p->ill[type].to == 0)
|
|
|
|
|
p->ill[type].datai = p->bombs_n;
|
|
|
|
|
printf ("player_set_ilness PI_nobomb %d\n", p->ill[type].datai);
|
|
|
|
|
p->bombs_n = s_random (2);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -736,19 +739,24 @@ player_clear_ilness (_player * p, int type)
|
|
|
|
|
{
|
|
|
|
|
if (type < 0 || type >= PI_max)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
d_printf ("player_clear_ilness Player: %s Type: %d\n", p->name, type);
|
|
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
case PI_slow:
|
|
|
|
|
case PI_fast:
|
|
|
|
|
p->speed = p->ill[type].dataf;
|
|
|
|
|
break;
|
|
|
|
|
case PI_range:
|
|
|
|
|
printf ("player_clear_ilness PI_range to %d\n", p->ill[type].datai);
|
|
|
|
|
p->range = p->ill[type].datai;
|
|
|
|
|
break;
|
|
|
|
|
case PI_nobomb:
|
|
|
|
|
printf ("player_clear_ilness PI_nobomb to %d\n", p->ill[type].datai);
|
|
|
|
|
p->bombs_n = p->ill[type].datai;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
p->ill[type].to = 0;
|
|
|
|
|
p->ill[type].to = 0.0;
|
|
|
|
|
if (GT_MP)
|
|
|
|
|
net_game_send_ill (bman.p_nr);
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|