The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: jimw546 on September 23, 2012, 02:15:18 PM

Title: Bug - Diagonal tracks disappearing
Post by: jimw546 on September 23, 2012, 02:15:18 PM
I'm playing on the latest stable release (111.0 and pak 0.8.3), just set up a new game and started placing railways, but when winter rolls in all diagonal tracks above the snowline disappear.  They are still there as trains still use the routes, but they stay invisible even when the season changes to spring.
Edit: Wrong board, sorry.
Title: Re: Bug - Diagonal tracks disappearing
Post by: jamespetts on September 23, 2012, 02:57:06 PM
Hmm - you refer to a Standard main release but an Experimental pakset release, which are mutually incompatible. Is it Standard or Experimental that you are using?

(Welcome to the forums, incidentally!)
Title: Re: Bug - Diagonal tracks disappearing
Post by: jimw546 on September 23, 2012, 03:25:38 PM
Definitely Experimental.  Downloaded the "Simutrans Experimental Complete" pack again a couple of days ago.
Title: Re: Bug - Diagonal tracks disappearing
Post by: jamespetts on September 23, 2012, 03:33:43 PM
Thank you for letting me know. This was a bug inherited from Standard, so merging with a more recent Standard version ought to fix it. The next version may well have the fix incorporated, but I must confess I do not recall immediately whether this is so. Thank you for the report, however!
Title: Re: Bug - Diagonal tracks disappearing
Post by: Lefthand on December 07, 2012, 12:01:11 PM
Hello,

I have this bug too. My diagonal railway pieces keep disappearing. Seemingly only where snowy ground appear at winter (above snow limit, I think).
EDIT: I can rebuild the railway for 0 cost, but at season change(?) they are disappear again.

I'm playing with 10.15 & Pak128.Britain-Ex 0.8.3.

By the way,
GREAT GAME, thank you :).

Lh.
Title: Re: Bug - Diagonal tracks disappearing
Post by: jamespetts on December 07, 2012, 12:06:49 PM
Firstly, this is a graphical bug only - the tracks do not actually disappear. Secondly, can you reproduce the problem in the Release Candidate?
Title: Re: Bug - Diagonal tracks disappearing
Post by: Lefthand on December 07, 2012, 08:45:09 PM
I tried it with RC tonight, with pakset 0.8.3 & 0.8.4.

The diagonal tracks keeps "Disappearing" (ok, just invisible :)). All type of railway, maglev and narrow gauge affected. Roads are not...
I see this happening when a snowy tile goes to green, or a green tile goes to snowy.

EDIT: With Simutrans normal & pak128 this bug is not reproducible.

Lh.
Title: Re: Bug - Diagonal tracks disappearing
Post by: jamespetts on December 08, 2012, 10:35:25 PM
Hmm, this is extremely odd, as Experimental has not changed any of the way drawing parts of the code from Standard, and this is a bug that was fixed in Standard some time ago (which fix ought to be incorporated in the Release Candidate at the very least).

Might any of the Standard developers have a clue what might be happening here, I wonder...?
Title: Re: Bug - Diagonal tracks disappearing
Post by: Lefthand on December 09, 2012, 06:30:16 PM
Hello again,

I tested this bug with pak64ex and can not reproduce.

After it I made a little debugging, and found this:
in weg.cc (when changing seasons)
at function void weg_t::set_images
in this part:
case image_diagonal:
         set_bild( besch->get_diagonal_bild_nr(ribi, snow) );

The besch->get_diagonal_bild_nr returns with 65535 like it can not find the image.
(But the besch->get_bild_nr (not diagonal) returns with 19753.)

I think the problem is lying somewhere here.

Sincerely:
Lh.
Title: Re: Bug - Diagonal tracks disappearing
Post by: Lefthand on December 09, 2012, 09:25:33 PM
I think i found a possible fix for this:

In weg.cc the besch->has_diagonal_bild returns false in case of railway pieces.

I modified the 460th line in  weg.cc  weg_t::check_season to this:
if(  is_diagonal()  && besch->has_diagonal_bild()  ) {

Now the railway pieces are not disappearing when season changes.

James Petts, please try this and do some test, if this is working. (I tried with one save file, and with a test scenario, but surely not covered all the possible cases.)

Sincerely:
Lh.

Excuse me for my english...
Title: Re: Bug - Diagonal tracks disappearing
Post by: jamespetts on December 09, 2012, 09:59:31 PM
That seems to work - that's very helpful! Thank you very much.
Title: Re: Bug - Diagonal tracks disappearing
Post by: jamespetts on January 01, 2013, 01:39:52 PM
This issue has now been fixed in the latest release (10.18) of Simutrans-Experimental.