diff -r 2de6d3a59743 -r 58522ed8f0f1 tunnelbridge_cmd.c --- a/tunnelbridge_cmd.c Wed Feb 01 06:32:03 2006 +0000 +++ b/tunnelbridge_cmd.c Wed Feb 01 07:36:15 2006 +0000 @@ -693,7 +693,7 @@ TileIndex start; // find start of bridge - for(;;) { + for (;;) { if (IsTileType(tile, MP_TUNNELBRIDGE) && (_m[tile].m5 & 0xE0) == 0x80) break; tile += direction ? TileDiffXY(0, -1) : TileDiffXY(-1, 0); @@ -702,7 +702,7 @@ start = tile; // find end of bridge - for(;;) { + for (;;) { if (IsTileType(tile, MP_TUNNELBRIDGE) && (_m[tile].m5 & 0xE0) == 0xA0) break; tile += direction ? TileDiffXY(0, 1) : TileDiffXY(1, 0); @@ -1007,9 +1007,15 @@ if (!(ti->tileh & p[3])) back_height += 8; } - for(; z>=front_height || z>=back_height; z=z-8) { - if (z>=front_height) AddSortableSpriteToDraw(image, x,y, p[4], p[5], 0x28, z); // front facing pillar - if (z>=back_height && z= front_height || z >= back_height; z = z - 8) { + if (z >= front_height) { + // front facing pillar + AddSortableSpriteToDraw(image, x,y, p[4], p[5], 0x28, z); + } + if (z >= back_height && z < i - 8) { + // back facing pillar + AddSortableSpriteToDraw(image, x - p[6], y - p[7], p[4], p[5], 0x28, z); + } } } }