|
|
|
@ -319,13 +319,27 @@ stepmove_player (int pl_nr)
|
|
|
|
|
_pos.x = p->pos.x & 255;
|
|
|
|
|
_pos.y = p->pos.y & 255;
|
|
|
|
|
|
|
|
|
|
if (_pos.x == 0 && _pos.y == 0 && map.field[fpos.x][fpos.y].type == FT_tunnel && p->tunnelto == -1) {
|
|
|
|
|
if (_pos.x == 0 && _pos.y == 0 && map.field[fpos.x][fpos.y].type == FT_tunnel
|
|
|
|
|
&& p->tunnelto == -1) {
|
|
|
|
|
d_printf ("Tunnel [%d] Player %s is going to (%d,%d)\n",
|
|
|
|
|
map.field[fpos.x][fpos.y].special, p->name,
|
|
|
|
|
map.tunnel[map.field[fpos.x][fpos.y].special].x,
|
|
|
|
|
map.tunnel[map.field[fpos.x][fpos.y].special].y);
|
|
|
|
|
d.x = d.y = 0;
|
|
|
|
|
if (map.
|
|
|
|
|
bfield[map.tunnel[map.field[fpos.x][fpos.y].special].x][map.
|
|
|
|
|
tunnel[map.
|
|
|
|
|
field[fpos.x][fpos.
|
|
|
|
|
y].
|
|
|
|
|
special].y])
|
|
|
|
|
d_printf (" *** End of tunnel is with an bomb.\n");
|
|
|
|
|
else {
|
|
|
|
|
p->pos.x = map.tunnel[map.field[fpos.x][fpos.y].special].x << 8;
|
|
|
|
|
p->pos.y = map.tunnel[map.field[fpos.x][fpos.y].special].y << 8;
|
|
|
|
|
p->tunnelto = GAME_TUNNEL_TO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (d.x == 0 && d.y == 0)
|
|
|
|
|
return 0;
|
|
|
|
@ -393,8 +407,6 @@ move_player (int pl_nr)
|
|
|
|
|
p->old_m = p->m; // save the old state
|
|
|
|
|
p->m = 0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* check the players position */
|
|
|
|
|
if ((p->pos.x & 0xFF) > EXPLOSION_SAVE_DISTANCE && (p->d == left || p->d == right))
|
|
|
|
|
if (!check_field ((p->pos.x >> 8) + 1, (p->pos.y >> 8)))
|
|
|
|
@ -408,6 +420,8 @@ move_player (int pl_nr)
|
|
|
|
|
&& (p->d == up || p->d == down)))
|
|
|
|
|
if (!check_field (p->pos.x >> 8, p->pos.y >> 8))
|
|
|
|
|
player_died (p, -1);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -485,7 +499,7 @@ get_player_on (short int x, short int y, int pl_nr[])
|
|
|
|
|
p;
|
|
|
|
|
|
|
|
|
|
for (i = 0, p = 0; p < MAX_PLAYERS; p++)
|
|
|
|
|
if (PS_IS_alife (bman.players[p].state)) {
|
|
|
|
|
if (PS_IS_alife (bman.players[p].state) && bman.players[p].tunnelto <= 0) {
|
|
|
|
|
if (bman.players[p].pos.x - EXPLOSION_SAVE_DISTANCE > x - 256
|
|
|
|
|
&& bman.players[p].pos.x + EXPLOSION_SAVE_DISTANCE < x + 256
|
|
|
|
|
&& bman.players[p].pos.y - EXPLOSION_SAVE_DISTANCE > y - 256
|
|
|
|
|