|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* $Id: bomb.c,v 1.67 2007/01/12 22:42:31 stpohle Exp $ */
|
|
|
|
|
/* $Id: bomb.c,v 1.68 2007/02/22 21:32:59 stpohle Exp $ */
|
|
|
|
|
/* everything what have to do with the bombs */
|
|
|
|
|
|
|
|
|
|
#include "bomberclone.h"
|
|
|
|
@ -131,14 +131,15 @@ void bomb_move (_bomb * bomb) {
|
|
|
|
|
step = (timefactor * bomb->fdata);
|
|
|
|
|
|
|
|
|
|
/* move the bomb to the new position */
|
|
|
|
|
if (bomb->dest.x < 0)
|
|
|
|
|
if (bomb->dest.x < 0.5f)
|
|
|
|
|
bomb->pos.x -= step;
|
|
|
|
|
else if (bomb->dest.x > 0)
|
|
|
|
|
else if (bomb->dest.x > 0.5f)
|
|
|
|
|
bomb->pos.x += step;
|
|
|
|
|
else if (bomb->dest.y < 0)
|
|
|
|
|
else if (bomb->dest.y < 0.5f)
|
|
|
|
|
bomb->pos.y -= step;
|
|
|
|
|
else if (bomb->dest.y > 0)
|
|
|
|
|
else if (bomb->dest.y > 0.5f)
|
|
|
|
|
bomb->pos.y += step;
|
|
|
|
|
// printf ("%2.3f,%2.3f\n", bomb->dest.x, bomb->dest.y);
|
|
|
|
|
|
|
|
|
|
/* if we are on a complete field, check if we
|
|
|
|
|
can move to the next one */
|
|
|
|
@ -184,6 +185,7 @@ void bomb_move (_bomb * bomb) {
|
|
|
|
|
i++;
|
|
|
|
|
} while (b == -1 && i < MAX_BOMBS);
|
|
|
|
|
|
|
|
|
|
/* if the bomb from our player send the current data again.. */
|
|
|
|
|
if (b != -1)
|
|
|
|
|
net_game_send_bomb (bman.p_nr, b);
|
|
|
|
|
}
|
|
|
|
|