The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: VS on February 18, 2012, 10:55:52 AM

Title: bug in r5358 - only first factory rotation used
Post by: VS on February 18, 2012, 10:55:52 AM
Original report (http://forum.simutrans.com/index.php?topic=9280.0): When city growth spawns a new end consumer, it is built always in first rotation, if it has even size (NxN). This does not happen if the industry is constructed manually.

If I read the code right...
1) The hierarchy of calls responsible for this is fabrikbauer_t::baue_hierarchie and then platzsucher_t::suche_platz.
2) Rotations after the first two are ignored entirely? (Rotation is passed as bool :-/ )
3) This happens only for factories in city, that are constructed by game itself. But not only end consumers.
Title: Re: bug in r5358 - only first factory rotation used
Post by: Dwachs on February 18, 2012, 08:13:31 PM
It seems that standard orientation is prefered by the implementation.
Title: Re: bug in r5358 - only first factory rotation used
Post by: Dwachs on February 19, 2012, 08:36:23 AM
here is a patch.
Title: Re: bug in r5358 - only first factory rotation used
Post by: VS on February 19, 2012, 12:16:12 PM
Tested, and it seems to work as intended. Thanks! Of course only the first two rotations are selected, but one can't want everything handed on a silver plate... :)
Title: Re: bug in r5358 - only first factory rotation used
Post by: Dwachs on February 19, 2012, 02:03:55 PM
If there are 4 possible rotations, then also all 4 rotations can be build. In my tests with pak128.Britain, factories in all 4 rotations were generated.
Title: Re: bug in r5358 - only first factory rotation used
Post by: VS on February 19, 2012, 02:39:29 PM
ARGH, I have been fooled! The pak I got as a test for 4 rotations contained only two :o I guess this is solved :D
Title: Re: bug in r5358 - only first factory rotation used
Post by: Iver on February 19, 2012, 08:48:37 PM
My bad  ;D
Title: Re: bug in r5358 - only first factory rotation used
Post by: Dwachs on April 30, 2012, 10:06:49 AM
in r5681.