Liquid bombs are now moving right..

origin
stpohle 22 years ago
parent 56eb2c9812
commit e5a0e775fa

@ -1,6 +1,6 @@
$Id: TODO,v 1.22 2003/08/29 23:50:39 stpohle Exp $
$Id: TODO,v 1.23 2003/08/30 11:45:54 stpohle Exp $
- more specials (Kicking Bomb, Pushing Bomb Ver.2)
- more specials (Kicking Bomb)
- network joining menu
Add: information about the playernames and the point list.

@ -1,4 +1,4 @@
/* $Id: bomb.c,v 1.42 2003/08/29 22:04:19 stpohle Exp $ */
/* $Id: bomb.c,v 1.43 2003/08/30 11:45:55 stpohle Exp $ */
/* everything what have to do with the bombs */
#include "bomberclone.h"
@ -29,6 +29,7 @@ draw_bomb (_bomb * bomb)
bomb->frameto = ANI_BOMBTIMEOUT;
}
}
dest.w = src.w = gfx.bomb.image->w;
dest.h = src.h = gfx.block.y;
dest.x = gfx.offset.x + (x >> 8) * gfx.block.x + gfx.postab[bomb->pos.x & 0x0FF];
@ -129,11 +130,35 @@ bomb_move (_bomb * bomb)
if (map.bfield[d.x][d.y] == 0 && (map.field[d.x][d.y].type == FT_nothing || map.field[d.x][d.y].type == FT_tunnel)) {
/* this direction is still oky */
map.bfield[d.x][d.y]++;
map.bfield[b.x][b.y]--;
map.bfield[d.x][d.y] = 1;
map.bfield[b.x][b.y] = 0;
keepdir = 1;
}
else if (bomb->mode == BM_liquid) {
/* liquid bomb so move to the other side */
keepdir = 0;
bomb->dest.x = -bomb->dest.x;
bomb->dest.y = -bomb->dest.y;
map.bfield[b.x][b.y] = 0;
map.bfield[b.x+bomb->dest.x][b.y+bomb->dest.y] = 1;
/* if a network game is running send bomb data with the
current information */
if (GT_MP_PTP) {
int b = -1, i = 0;
do {
if (&bman.players[bman.p_nr].bombs[i] == bomb)
b = i;
i++;
} while (b == -1 && i < MAX_BOMBS);
if (b != -1)
net_game_send_bomb (bman.p_nr, b);
}
}
else {
/* stop moving this bomb */
keepdir = 0;
bomb->mode = BM_normal;
}
@ -332,7 +357,7 @@ restore_explosion (_bomb * bomb)
/* delete field from the bfield map */
if (bomb->mode == BM_moving || bomb->mode == BM_pushed || bomb->mode == BM_liquid)
map.bfield[bpos.x + bomb->dest.x][bpos.y + bomb->dest.y] = 0;
else
map.bfield[bpos.x][bpos.y] = 0;
};

@ -1,4 +1,4 @@
/* $Id: map.c,v 1.10 2003/08/29 22:04:19 stpohle Exp $ */
/* $Id: map.c,v 1.11 2003/08/30 11:45:55 stpohle Exp $ */
/* map handling, like generate and load maps. */
#include "bomberclone.h"
@ -115,9 +115,9 @@ map_new (char *filename)
/* put the row special in the field */
map_fillitems (FT_sp_row, map.sp_row);
/* put the push special in the field */
map_fillitems (FT_sp_push, map.sp_push/3);
map_fillitems (FT_sp_liquid, map.sp_push/3);
map_fillitems (FT_sp_moved, map.sp_push/3);
map_fillitems (FT_sp_push, map.sp_push);
map_fillitems (FT_sp_liquid, map.sp_push);
map_fillitems (FT_sp_moved, map.sp_push);
map.type = old_maptype;
}

Loading…
Cancel
Save