The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Dwachs on November 23, 2011, 07:45:33 PM

Title: [Patch] cities bridge over rivers
Post by: Dwachs on November 23, 2011, 07:45:33 PM
This patch enables cities to build bridges across rivers.

(http://simutrans-germany.com/files/upload/citybridge.png)
Title: Re: [Patch] cities bridge over rivers
Post by: VS on November 23, 2011, 08:31:58 PM
Thanks :D Finally solved!
Title: Re: [Patch] cities bridge over rivers
Post by: TurfIt on November 23, 2011, 08:42:48 PM
Looks good.
Can create dead-end bridges though...
Title: Re: [Patch] cities bridge over rivers
Post by: Fabio on November 23, 2011, 09:47:53 PM
A most awaited feat. Great!
Title: Re: [Patch] cities bridge over rivers
Post by: wlindley on November 23, 2011, 10:56:08 PM
Works in Experimental, too, with one slight change (extra parameter to baue_gebauede())

http://forum.simutrans.com/index.php?topic=8602.0
Title: Re: [Patch] cities bridge over rivers
Post by: Dwachs on December 03, 2011, 11:18:42 AM
in r4965
Title: Re: [Patch] cities bridge over rivers
Post by: Václav on December 03, 2011, 09:20:28 PM
Only minor question: what is limitation of river's width?
Title: Re: [Patch] cities bridge over rivers
Post by: prissi on December 03, 2011, 10:44:19 PM
I found two issues:

First the bridges belong to nobody, thus everybody can destroy them. Also the indicator color is such case say it belongs to player 1. Maybe those should belong to the public player. If such a bridges is destroyed then the ground on the landing site has the wrong z-offset and the road type is also wrong. (I think this is somewhat connected to bridges without owner, which were not really considered legal so far, together with unowned tunnels or elevated roads.)

Another point is that the bridges are way too fast. Maybe rather the first matching bridges with a speed <= should be chosen.

The last think would be a parameter to make them less likely. Currently every road ending at a river is bridging it. Thus a town can have 7 bridges parallel (ok, was a little extreme case, but still ... )
Title: Re: [Patch] cities bridge over rivers
Post by: Dwachs on December 04, 2011, 09:35:34 AM
Quote from: VaclavMacurek on December 03, 2011, 09:20:28 PM
Only minor question: what is limitation of river's width?
It can bridge 2 tiles of river or sea.
Quote from: prissi on December 03, 2011, 10:44:19 PM
First the bridges belong to nobody, thus everybody can destroy them. Also the indicator color is such case say it belongs to player 1. Maybe those should belong to the public player. If such a bridges is destroyed then the ground on the landing site has the wrong z-offset and the road type is also wrong. (I think this is somewhat connected to bridges without owner, which were not really considered legal so far, together with unowned tunnels or elevated roads.)
fixed in 4969

Quote from: prissi on December 03, 2011, 10:44:19 PM
Another point is that the bridges are way too fast. Maybe rather the first matching bridges with a speed <= should be chosen.
The bridge is chosen according to timeline, using the functions from the bridge builder.

Quote from: prissi on December 03, 2011, 10:44:19 PM
The last think would be a parameter to make them less likely. Currently every road ending at a river is bridging it. Thus a town can have 7 bridges parallel (ok, was a little extreme case, but still ... )
In my tests, I have never seen a city building two bridges next to each other.
Title: Re: [Patch] cities bridge over rivers
Post by: prissi on December 04, 2011, 11:07:32 PM
With seven bridges in parallel I mean 7 bridges only 1-2 tiles away from each other. About the bridges builder hmm.