Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[r6656-r6664] Building slope basement built in wrong tile

Started by An_dz, August 29, 2013, 05:37:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


When you build a building next to a slope, on the bottom, the building slope basement graphic is used in the diagonal slope tile.
Well, my explanation was horrible so here's a picture.

Both images are the same building but with different rotation.


Actually it would look prettier if all three slopes (back and both diagonals) would have walls.


But this would kill my creation. I'm creating a rural attraction and it would look lame with 3 city slope graphic.


Perhaps we should have two different artificial slope- tools, which would create different textures to the slope walls. This would give more control of the enviroment to the player.


Confirmed bug - this has been present since 111.2.2 at least.


Patch to fix this in 6664. I can't get to SVN at moment so haven't been able to commit this. Should note that this patch sets slopes to be artificial if there is a building at the top or bottom of the vertical slope.

Really long term we might need to consider a more flexible solution to slopes as the current system does have it's limitations.

Index: boden/
--- boden/    (revision 6664)
+++ boden/    (working copy)
@@ -755,7 +755,7 @@
     sint8 back_bild_nr=0;
-    bool is_building = false;
+    bool is_building = get_typ()==grund_t::fundament;
     const bool isvisible = is_visible();
     bool fence[2]={false, false};
     const koord k = get_pos().get_2d();
@@ -841,12 +841,12 @@
             if(  (diff_from_ground_1-corner_a>0  ||  diff_from_ground_2-corner_b>0)
                 &&  (diff_from_ground_1>0  ||  diff_from_ground_2>0)  ) {
                 back_bild_nr += get_backbild_from_diff( diff_from_ground_1, diff_from_ground_2 )*(i==0?1:11);
+                is_building |= gr->get_typ()==grund_t::fundament;
             // avoid covering of slope by building ...
             if(  (left_back_is_building  ||  gr->get_flag(draw_as_ding))  &&  (back_bild_nr>i*11  ||  gr->get_back_bild(1-i)!=IMG_LEER)) {
-            is_building |= gr->get_typ()==grund_t::fundament;

@@ -861,7 +861,6 @@
         if(fence_offset) {
             back_bild_nr = 121 + fence_offset;
-        is_building = get_typ()==grund_t::fundament;
     this->back_bild_nr = (is_building!=0)? -back_bild_nr : back_bild_nr;


Thanks kierongreen, it's working. Someone needs to push this.



not 100% fixed:

4 rotations (see the tree), wrong slope type on sides/ not adjacent to building


This is a different bug, which is years old. It is a limitation of the code: the slope images belong to the tile in front. Both slope images behind the tile are either both building foundations or natural walls. If there is one building above it chooses the building foundations for both.

This could have been fixed for the single-height slope code of previous versions, I do not know whether this can be fixed easily with double-height slopes.
Parsley, sage, rosemary, and maggikraut.