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 {
@ -97,7 +99,7 @@ struct __player {
int speed; // how fast we can go (0 = slow, 1 = normal... 3 = fastest) int speed; // how fast we can go (0 = slow, 1 = normal... 3 = fastest)
int speeddat; // some data i need to do the speed thing int speeddat; // some data i need to do the speed thing
_playerilness ill[PI_max]; // all possible types _playerilness ill[PI_max]; // all possible types
_special special; // special the player has _special special; // special the player has
char name[LEN_PLAYERNAME]; // name oder name[0] == 0 char name[LEN_PLAYERNAME]; // name oder name[0] == 0
unsigned char state; // status of the player unsigned char state; // status of the 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,34 +191,38 @@ special_loop (int p_nr)
{ {
_special *s = &bman.players[p_nr].special; _special *s = &bman.players[p_nr].special;
if (s->use) {
switch (bman.players[p_nr].special.type) {
case SP_trigger:
special_trigger (p_nr);
break;
case SP_row:
if (bman.players[p_nr].m)
special_row (p_nr);
break;
case SP_push:
if (bman.players[p_nr].m)
special_push (p_nr);
break;
case SP_kick:
break;
}
s->use = 0;
}
if (!s->type) if (!s->type)
return; return;
if (s->to) { if (s->to) {
s->to--; s->to--;
if (!s->to) if (!s->to)
special_clear (p_nr); special_clear (p_nr);
} }
} }
void void
special_use (int p_nr) special_use (int p_nr)
{ {
bman.players[p_nr].special.use = 1;
switch (bman.players[p_nr].special.type) {
case SP_trigger:
special_trigger (p_nr);
break;
case SP_row:
if (bman.players[p_nr].m)
special_row (p_nr);
break;
case SP_push:
if (bman.players[p_nr].m)
special_push (p_nr);
break;
case SP_kick:
break;
}
} }

Loading…
Cancel
Save