pushung bomb and wrong direction illness bug fixed

origin
stpohle 23 years ago
parent 18693a2620
commit cd0af836ed

@ -2,6 +2,8 @@ Version 0.9.9
============= =============
fix2 fix2
- pushing bombs and wrong directin illness
- fixed: remove network flag from disconected players - fixed: remove network flag from disconected players
so we won't send data to players in the game which so we won't send data to players in the game which
have already disconnected have already disconnected

@ -1,7 +1,6 @@
this version (fix2): this version (fix2):
==================== ====================
- pushing bombs and wrong directin illness
- special trigger bomb over.. all trigger bombs have to be - special trigger bomb over.. all trigger bombs have to be
to normal bombs. to normal bombs.

@ -1,4 +1,4 @@
/* $Id: bomberclone.h,v 1.40 2003/06/22 02:03:09 stpohle Exp $ */ /* $Id: bomberclone.h,v 1.41 2003/07/12 23:55:08 stpohle Exp $ */
/* bomberclone.h */ /* bomberclone.h */
#ifndef _BOMBERCLONE_H_ #ifndef _BOMBERCLONE_H_
@ -71,6 +71,8 @@ struct __special {
int type; // type of the special int type; // type of the special
int to; // timeout int to; // timeout
int numuse; // num of uses left int numuse; // num of uses left
int use; /* currently used set by special_use
and deleted in special_loop */
} typedef _special; } typedef _special;
struct __player { struct __player {

@ -203,6 +203,7 @@ game_loop ()
dead_playerani (); dead_playerani ();
player_ilness_loop (bman.p_nr); player_ilness_loop (bman.p_nr);
special_loop(bman.p_nr); special_loop(bman.p_nr);
if ((bman.players[bman.p_nr].state & PSFM_alife) == PSFM_alife) if ((bman.players[bman.p_nr].state & PSFM_alife) == PSFM_alife)
move_player (bman.p_nr); move_player (bman.p_nr);

@ -674,6 +674,7 @@ player_set_ilness (_player * p, int t)
type = s_random (PI_max); type = s_random (PI_max);
else else
type = t; type = t;
d_printf ("Ilness : %d\n", type); d_printf ("Ilness : %d\n", type);
switch (type) { switch (type) {
case PI_slow: case PI_slow:

@ -191,21 +191,7 @@ special_loop (int p_nr)
{ {
_special *s = &bman.players[p_nr].special; _special *s = &bman.players[p_nr].special;
if (!s->type) if (s->use) {
return;
if (s->to) {
s->to--;
if (!s->to)
special_clear (p_nr);
}
}
void
special_use (int p_nr)
{
switch (bman.players[p_nr].special.type) { switch (bman.players[p_nr].special.type) {
case SP_trigger: case SP_trigger:
special_trigger (p_nr); special_trigger (p_nr);
@ -221,4 +207,22 @@ special_use (int p_nr)
case SP_kick: case SP_kick:
break; break;
} }
s->use = 0;
}
if (!s->type)
return;
if (s->to) {
s->to--;
if (!s->to)
special_clear (p_nr);
}
}
void
special_use (int p_nr)
{
bman.players[p_nr].special.use = 1;
} }

Loading…
Cancel
Save