The International Simutrans Forum

Development => Bug Reports => Topic started by: Yona-TYT on December 09, 2014, 03:58:51 AM

Title: Underwater tunnel is broken
Post by: Yona-TYT on December 09, 2014, 03:58:51 AM
By lowering the lake level, the underwater tunnel is destroyed.


(https://www.mediafire.com/convkey/8df7/svm1lrbrw3mmjm56g.jpg)


(https://www.mediafire.com/convkey/196c/n99katxgurqo6d36g.jpg)


(https://www.mediafire.com/convkey/6f29/2zz7rm1975pkmze6g.jpg)


(https://www.mediafire.com/convkey/f5db/8i6n6s668z6inrm6g.jpg)
Title: Re: Underwater tunnel is broken
Post by: DrSuperGood on December 09, 2014, 05:08:54 AM
One of the funniest bugs I have seen lol.

I am guessing when lowering the water level it should check if there is a tunnel directly under and if so then convert it into an artificial wall.
Title: Re: Underwater tunnel is broken
Post by: Yona-TYT on December 09, 2014, 05:26:29 AM
Quote from: DrSuperGood on December 09, 2014, 05:08:54 AM
One of the funniest bugs I have seen lol.

I am guessing when lowering the water level it should check if there is a tunnel directly under and if so then convert it into an artificial wall.
:o
Title: Re: Underwater tunnel is broken
Post by: kierongreen on December 09, 2014, 08:05:56 AM
Rather the check for if tunnels are below seabed should check all 4 corners of a tile not just one....
Title: Re: Underwater tunnel is broken
Post by: DrSuperGood on December 09, 2014, 12:52:55 PM
QuoteRather the check for if tunnels are below seabed should check all 4 corners of a tile not just one....
That means there are two possible ways to handle it.

1. Tunnels that are directly below the surface on an edge of an elevation change result in artificial walls when the water is drained. This would not disrupt any existing tunnels and would be kind of neat to see the tunnel after draining.
2. Tunnels cannot be placed so close to the edges of a lake. As you mentioned it could check all 4 corners of the placed tile checking for clearance so that an appropriate ramp has sufficient place to be created without disrupting the tunnel during draining.

Personally 1 would be the best as it would give you more space next to water for placement of tunnels while still supporting draining and has perfect legacy support (as placement has not changed). 2 would also be a valid way to handle it but could result in several legacy tunnels (placed before the change) existing in invalid places but would stop any more from being made.
Title: Re: Underwater tunnel is broken
Post by: prissi on December 09, 2014, 11:37:56 PM
I think the legacy support is not very pressing, since this feature is new and only few games could have it at all. Moreover, at least in pak64 only the public player can drain a lake.

A tunnel should (and does) usually test for full hight with other tunnels. The same shoudl apply for sea beds.