|
|
@ -39,7 +39,7 @@ draw_bomb (_bomb * bomb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
bomb_explode (int p, int b)
|
|
|
|
bomb_explode (int p, int b, int net)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int d;
|
|
|
|
int d;
|
|
|
|
_bomb *bomb = &bman.players[p].bombs[b];
|
|
|
|
_bomb *bomb = &bman.players[p].bombs[b];
|
|
|
@ -56,7 +56,7 @@ bomb_explode (int p, int b)
|
|
|
|
bomb->firerst[d] = -1;
|
|
|
|
bomb->firerst[d] = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (GT_MP_PTPM) /* from now on only the server let the bomb explode */
|
|
|
|
if (GT_MP_PTPM && net) /* from now on only the server let the bomb explode */
|
|
|
|
net_game_send_bomb (p, b);
|
|
|
|
net_game_send_bomb (p, b);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -79,7 +79,7 @@ bomb_loop ()
|
|
|
|
case BS_ticking:
|
|
|
|
case BS_ticking:
|
|
|
|
if (GT_MP_PTPM || bman.gametype == GT_single) {
|
|
|
|
if (GT_MP_PTPM || bman.gametype == GT_single) {
|
|
|
|
if (--bomb->to == 0) // bomb will have to explode in the next loop
|
|
|
|
if (--bomb->to == 0) // bomb will have to explode in the next loop
|
|
|
|
bomb_explode (p, i);
|
|
|
|
bomb_explode (p, i, 1);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
draw_bomb (bomb);
|
|
|
|
draw_bomb (bomb);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -128,7 +128,7 @@ get_bomb_on (int x, int y, _point bombs[])
|
|
|
|
if ((bman.players[p].state & PSFM_used) != 0) {
|
|
|
|
if ((bman.players[p].state & PSFM_used) != 0) {
|
|
|
|
for (b = 0; b < MAX_BOMBS; b++) {
|
|
|
|
for (b = 0; b < MAX_BOMBS; b++) {
|
|
|
|
bomb = &bman.players[p].bombs[b];
|
|
|
|
bomb = &bman.players[p].bombs[b];
|
|
|
|
if (bomb->state == BS_ticking) {
|
|
|
|
if (bomb->state == BS_ticking || bomb->state==BS_trigger) {
|
|
|
|
if (bomb->pos.x == x && bomb->pos.y == y) {
|
|
|
|
if (bomb->pos.x == x && bomb->pos.y == y) {
|
|
|
|
bombs[i].x = p;
|
|
|
|
bombs[i].x = p;
|
|
|
|
bombs[i].y = b;
|
|
|
|
bombs[i].y = b;
|
|
|
@ -268,7 +268,7 @@ explosion_check_field (int x, int y, int p, int b)
|
|
|
|
tmpbomb = &bman.players[bo[i].x].bombs[bo[i].y];
|
|
|
|
tmpbomb = &bman.players[bo[i].x].bombs[bo[i].y];
|
|
|
|
if (tmpbomb != bomb && tmpbomb->state != BS_exploding) {
|
|
|
|
if (tmpbomb != bomb && tmpbomb->state != BS_exploding) {
|
|
|
|
tmpbomb->ex_nr = bomb->ex_nr; // set the ex_nr to identify explosions
|
|
|
|
tmpbomb->ex_nr = bomb->ex_nr; // set the ex_nr to identify explosions
|
|
|
|
bomb_explode (bo[i].x, bo[i].y);
|
|
|
|
bomb_explode (bo[i].x, bo[i].y, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|