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
- pushing bombs and wrong directin illness
- fixed: remove network flag from disconected players
so we won't send data to players in the game which
have already disconnected

@ -1,7 +1,6 @@
this version (fix2):
====================
- pushing bombs and wrong directin illness
- special trigger bomb over.. all trigger bombs have to be
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 */
#ifndef _BOMBERCLONE_H_
@ -71,6 +71,8 @@ struct __special {
int type; // type of the special
int to; // timeout
int numuse; // num of uses left
int use; /* currently used set by special_use
and deleted in special_loop */
} typedef _special;
struct __player {
@ -97,7 +99,7 @@ struct __player {
int speed; // how fast we can go (0 = slow, 1 = normal... 3 = fastest)
int speeddat; // some data i need to do the speed thing
_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
unsigned char state; // status of the player

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

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

@ -158,7 +158,7 @@ void
special_pickup (int p_nr, int s_nr)
{
_special *s = &bman.players[p_nr].special;
s->to = 0;
s->numuse = 0;
s->type = s_nr;
@ -174,7 +174,7 @@ special_pickup (int p_nr, int s_nr)
s->to = SPECIAL_PUSH_TIME * TIME_FACTOR;
break;
}
bman.updatestatusbar = 1;
}
@ -191,34 +191,38 @@ special_loop (int p_nr)
{
_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)
return;
if (s->to) {
s->to--;
s->to--;
if (!s->to)
special_clear (p_nr);
}
}
}
void
special_use (int p_nr)
{
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;
}
bman.players[p_nr].special.use = 1;
}

Loading…
Cancel
Save