The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Nazalassa on August 22, 2024, 12:47:22 PM

Title: Removing a crossing does not remove the track below it
Post by: Nazalassa on August 22, 2024, 12:47:22 PM
This bug has been found in r11372.

Simply build a crossing between a road and a track. Then, use the remove tool on the tile where the crossing is. It will first remove the crossing, leaving the road and track. Then it will remove the track, and then the road:

crossing.gif

This is not as it should be: removing the crossing should also remove the track below it.

Using the inspection tool on a tile with no crossing but a road and a track (so, after using the remove tool once) causes Simutrans to crash with a segmentation fault.
Title: Re: Removing a crossing does not remove the track below it
Post by: prissi on August 22, 2024, 08:06:03 PM
Oh, that unearthed a very old bug (likely present in extended too) of obj_count() returning not the actual count if it was a way. That was a relict from the old handling of ways when they were still part of the ground structure. It may had side effects also on city building and some other occasional strange occurings.

Fixed in r11388