From 98b8fc4c501667509e1397f2c104ea96ff32c365 Mon Sep 17 00:00:00 2001 From: stpohle Date: Sun, 22 Jun 2003 20:00:47 +0000 Subject: [PATCH] fixed: bomb dropping will check now correctly if there is already a bomb at the new field --- src/player.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/player.c b/src/player.c index fb957b3..f231457 100644 --- a/src/player.c +++ b/src/player.c @@ -383,9 +383,13 @@ player_drop_bomb (int pl_nr) _y = 0; } + bomb->pos.x = bomb->pos.x << 8; + bomb->pos.y = bomb->pos.y << 8; + get_bomb_on (bomb->pos.x, bomb->pos.y, bombs); if (bombs[0].x != -1) // is there already a bomb return; + d_printf ("Player %d Dropped Bomb %d\n", pl_nr, i); bomb->r = player->range; if (player->special.type == SP_trigger) { @@ -397,9 +401,7 @@ player_drop_bomb (int pl_nr) bomb->to = BOMB_TIMEOUT * TIME_FACTOR; // 5 Secs * 200 } bomb->ex_nr = -1; - bman.bfield[bomb->pos.x][bomb->pos.y] = 1; - bomb->pos.x = bomb->pos.x << 8; - bomb->pos.y = bomb->pos.y << 8; + bman.bfield[bomb->pos.x >> 8][bomb->pos.y >> 8] = 1; if (bman.gametype != GT_single) { net_game_send_bomb (pl_nr, i); if (GT_MP_PTPS)