Bomb will now explode on full fields if they are pushed.

origin
stpohle 22 years ago
parent eaca81b97a
commit 237f1e5236

@ -1,4 +1,4 @@
/* $Id: bomb.c,v 1.39 2003/08/10 15:10:19 stpohle Exp $ */ /* $Id: bomb.c,v 1.40 2003/08/25 15:07:25 stpohle Exp $ */
/* everything what have to do with the bombs */ /* everything what have to do with the bombs */
#include "bomberclone.h" #include "bomberclone.h"
@ -112,6 +112,7 @@ bomb_move (_bomb * bomb)
bomb->moves = 0; bomb->moves = 0;
return; return;
} }
// calculate movement // calculate movement
if (abs(dx)>bomb->moves || abs(dy)>bomb->moves) { if (abs(dx)>bomb->moves || abs(dy)>bomb->moves) {
vec=sqrt(dx*dx+dy*dy); vec=sqrt(dx*dx+dy*dy);
@ -176,9 +177,9 @@ bomb_loop ()
} }
draw_bomb (bomb); draw_bomb (bomb);
} }
if (bomb->moves > 0) bomb_move(bomb); if (bomb->moves > 0 && bomb->state != BS_exploding) bomb_move(bomb);
b++; // Count ticking Bombs for Return value b++; // Count ticking Bombs for Return value
break; break;
case BS_exploding: case BS_exploding:
if (bomb->to > 0) { if (bomb->to > 0) {
do_explosion (p, i); do_explosion (p, i);

Loading…
Cancel
Save