Skip to content

Commit

Permalink
FIX do not display vehicles on invisible neighboring tiles
Browse files Browse the repository at this point in the history
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@8211 8aca7d54-2c30-db11-9de9-000461428c89
  • Loading branch information
Dwachs committed Apr 13, 2017
1 parent edcdb22 commit 9995253
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions boden/grund.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,9 @@ void grund_t::display_obj_all(const sint16 xpos, const sint16 ypos, const sint16
if( ribi & ribi_t::west ) {
grund_t *gr;
if( get_neighbour( gr, invalid_wt, ribi_t::west ) ) {
gr->display_obj_vh( xpos - raster_tile_width / 2, ypos - raster_tile_width / 4 - tile_raster_scale_y( (gr->get_hoehe() - pos.z) * TILE_HEIGHT_STEP, raster_tile_width ), 0, ribi_t::west, false CLIP_NUM_PAR );
if (!tunnel_portal || gr->is_visible()) {
gr->display_obj_vh( xpos - raster_tile_width / 2, ypos - raster_tile_width / 4 - tile_raster_scale_y( (gr->get_hoehe() - pos.z) * TILE_HEIGHT_STEP, raster_tile_width ), 0, ribi_t::west, false CLIP_NUM_PAR );
}
if( ribi & ribi_t::south ) {
gr->get_neighbour( gr_nw, invalid_wt, ribi_t::north );
}
Expand All @@ -1480,7 +1482,9 @@ void grund_t::display_obj_all(const sint16 xpos, const sint16 ypos, const sint16
if( ribi & ribi_t::north ) {
grund_t *gr;
if( get_neighbour( gr, invalid_wt, ribi_t::north ) ) {
gr->display_obj_vh( xpos + raster_tile_width / 2, ypos - raster_tile_width / 4 - tile_raster_scale_y( (gr->get_hoehe() - pos.z) * TILE_HEIGHT_STEP, raster_tile_width ), 0, ribi_t::north, false CLIP_NUM_PAR );
if (!tunnel_portal || gr->is_visible()) {
gr->display_obj_vh( xpos + raster_tile_width / 2, ypos - raster_tile_width / 4 - tile_raster_scale_y( (gr->get_hoehe() - pos.z) * TILE_HEIGHT_STEP, raster_tile_width ), 0, ribi_t::north, false CLIP_NUM_PAR );
}
if( (ribi & ribi_t::east) && (gr_nw == NULL) ) {
gr->get_neighbour( gr_nw, invalid_wt, ribi_t::west );
}
Expand Down

0 comments on commit 9995253

Please sign in to comment.