tunnel problem fixed.. two of 4 tunnels didn't worked

origin
stpohle 22 years ago
parent 9e4a177e3a
commit 70a03c02c3

@ -314,18 +314,16 @@ stepmove_player (int pl_nr)
/* check if we can go though a tunnel */
if (_pos.x == 0.0f && _pos.y == 0.0f && map.field[(int)p->pos.x][(int)p->pos.y].type == FT_tunnel
&& p->tunnelto <= 0.0f) {
d_printf ("Tunnel [%d] Player %s is going to (%d,%d)\n",
map.field[(int)p->pos.x][(int)p->pos.y].special, p->name,
map.tunnel[map.field[(int)p->pos.x][(int)p->pos.y].special].x,
map.tunnel[map.field[(int)p->pos.x][(int)p->pos.y].special].y);
int tunnelnr = map.field[(int)p->pos.x][(int)p->pos.y].special;
d_printf ("Tunnel [%d] Player %s is going to (%d,%d)\n", tunnelnr, p->name,
map.tunnel[tunnelnr].x, map.tunnel[tunnelnr].y);
d.x = d.y = 0.0f;
if (map.
bfield[map.tunnel[map.field[(int)p->pos.x][(int)p->pos.y].special].x]
[map.tunnel[map.field[(int)p->pos.x][(int)p->pos.y].special].y])
if (map.bfield[map.tunnel[tunnelnr].x][map.tunnel[tunnelnr].y])
d_printf (" *** End of tunnel is with an bomb.\n");
else {
p->pos.x = map.tunnel[map.field[(int)p->pos.x][(int)p->pos.y].special].x;
p->pos.y = map.tunnel[map.field[(int)p->pos.x][(int)p->pos.y].special].y;
p->pos.x = map.tunnel[tunnelnr].x;
p->pos.y = map.tunnel[tunnelnr].y;
p->tunnelto = GAME_TUNNEL_TO;
speed = p->speed * timefactor;
}
@ -371,7 +369,7 @@ move_player (int pl_nr)
oldd = p->d;
if (p->tunnelto > 0) {
if (p->tunnelto > 0.0f) {
p->tunnelto -= timediff;
p->m = 0;
if (p->tunnelto <= 0.0f && GT_MP)
@ -392,9 +390,6 @@ move_player (int pl_nr)
/* network packet send control - send data if it's time to send or if we need to */
if (GT_MP)
net_game_send_playermove (pl_nr, (p->old_m == 0));
if (p->tunnelto == 0 && (map.field[postofield(p->pos.x)][postofield(p->pos.y)].type != FT_tunnel || !field_check_alldirs (postofield(p->pos.x), postofield(p->pos.y), FT_nothing)))
p->tunnelto = -1;
}
/* the player just stopt moving so send data */

Loading…
Cancel
Save