The International Simutrans Forum

Development => Patches & Projects => Topic started by: Dwachs on December 23, 2008, 09:34:43 PM

Title: Bugfix: Slopetools
Post by: Dwachs on December 23, 2008, 09:34:43 PM
This is a small patch fixing some odd wrong behaviour of slopetools regarding double heights. See image: Without the patch is possible to add a full slope at spots marked 'o', and it was possible to do a full slope dig at the tiles 'x'. Both the double-high tower and the double-height hole were not recognized.

I assumed the corner1 .. corner4-macros work with the following configuration of corner numbers

1 -- 2
|    |
4 -- 3


edith: patch updated
Title: Re: Bugfix: Slopetools
Post by: prissi on December 23, 2008, 10:35:57 PM
Well spotted, this stemmed still from pre-rotation times. But it still fails directly next to a slope, where now triple height are allowed.
Title: Re: Bugfix: Slopetools
Post by: Dwachs on December 25, 2008, 01:18:48 PM
personally, I think this is more a bug in the back-image calculation, since the double-heigth above a slope can still be displayed with the graphics already in pak's. I will take a look into this.

I corrected the patch, see updated patch file above. I was not aware of the fact that the double-height restriction is not only enforced in the corners of the tiles but also with respect to the height of the whole tile.
Title: Re: Bugfix: Slopetools
Post by: prissi on December 25, 2008, 09:04:52 PM
Sorry, was not thinking correctly. The patch was too complicated and could have been done much easier ...