The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Ichou on April 06, 2017, 08:07:12 AM

Title: Patch to Shift-constriction mode
Post by: Ichou on April 06, 2017, 08:07:12 AM
<This topic is derived from http://forum.simutrans.com/index.php?topic=16851.0 (http://forum.simutrans.com/index.php?topic=16851.0)>

I made a patch to complete Shift-construction mode.
This patch is based on r8188.

This patch has 2 additional functions.

Therefore, with this patch, you can receive much convenience as the movie shows.
[vimeo]https://vimeo.com/211881257[/vimeo]

This patch will definitely make your Simutrans more useful!
Title: Re: Patch to Shift-constriction mode
Post by: Leartin on April 06, 2017, 08:25:05 AM
Looking good, hope it has no side effects so it can be implemented :)
Title: Re: Patch to Shift-constriction mode
Post by: Ichou on April 06, 2017, 10:16:59 AM
I confirmed this works with r8163 - the latest stable version.
Title: Re: Patch to Shift-constriction mode
Post by: Dwachs on April 06, 2017, 07:37:01 PM
Imho the patch doubles some code in wegbauer.cc, which is not nice from a maintaining perspective. It should be possible to obtain the same behavior by modifying just the essential parts. Also you do not need a second instance of marker_t.
Title: Re: Patch to Shift-constriction mode
Post by: Ichou on April 07, 2017, 01:32:22 AM
QuoteImho the patch doubles some code in wegbauer.cc, which is not nice from a maintaining perspective. It should be possible to obtain the same behavior by modifying just the essential parts. Also you do not need a second instance of marker_t.
I wonder whether it is possible to make a grund_t obj which means there is no obj, and which contains only the coordinates as meaningful information.
If it's possible, I don't need the second instance of marker_t and reduce some double coding easily.
If it's not possible, I need it because it has to distinguish the two situations that the tile is visited as "lower" or "upper" layers.





I reduced part of doubled coding.(Not all!)

Changing general source to search ways, it might cause a problem related to groundway/bridge/tunnels/... construction.
Title: Re: Patch to Shift-constriction mode
Post by: prissi on August 11, 2017, 02:46:37 AM
Thank you incorporated in r8284, thank you
Title: Re: Patch to Shift-constriction mode
Post by: Dwachs on August 11, 2017, 03:32:17 PM
Now we have a lot of code duplicated and triplicated in wegbauer.cc
Title: Re: Patch to Shift-constriction mode
Post by: prissi on August 19, 2017, 03:00:23 PM
Yes, but it reduced the otherwise even larger check for readiness for places. Not sure how one could get away without duplication in some place.