The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: neroden on January 09, 2011, 08:33:30 PM

Title: Track disappearing when season changes
Post by: neroden on January 09, 2011, 08:33:30 PM
The track doesn't actually disappear, but it does stop being visible -- only way to show it again is to rotate the map.

There's a problem in the tile-swapping routine which swaps out "green" for "snowy" and vice versa evidently; either that or a problem in the way the images for the track in the pak are laid out, so it's not compatible with said tile-swapping routine.  I've only identified it with Wrought Iron Track in pak128.britain.experimental, so far, but that's because that's the only track I'm using.
Title: Re: Track disappearing when season changes
Post by: jamespetts on January 09, 2011, 08:35:01 PM
Thank you for the report - is this unique to Experimental? I ask because Experimental's changes don't go near the graphics routines.
Title: Re: Track disappearing when season changes
Post by: ӔO on January 09, 2011, 08:37:19 PM
I think this was also happening back in 8.2.
In 8.2,  only diagonal tracks disappeared for some reason.
Title: Re: Track disappearing when season changes
Post by: neroden on January 11, 2011, 05:17:59 AM
Quote from: jamespetts on January 09, 2011, 08:35:01 PM
Thank you for the report - is this unique to Experimental? I ask because Experimental's changes don't go near the graphics routines.
I don't play Standard any more (the TGV-on-sand-track bug is too annoying) so I wouldn't know.  :-)

The season changes are currently handled using a rather nasty piece of optimized code which swaps images according to their index numbers -- located in a place you'd never expect it -- so I'm wondering if it's something to do with the pak layout.

As AEO says, this was happening back in 8.2 as well.  That time it was due to new code in experimental managing to miss one of the cases where the optimized swap-out took place.

Unfortunately, I'm not currently finding the optimized swap-out code at all, I've completely forgotten where it is.  :-(
Title: Re: Track disappearing when season changes
Post by: Junna on January 12, 2011, 06:28:41 PM
Quote from: AEO on January 09, 2011, 08:37:19 PM
I think this was also happening back in 8.2.
In 8.2,  only diagonal tracks disappeared for some reason.

For me, this still only happens with diagonal track.