The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: Ranran on February 01, 2021, 01:02:08 PM

Title: [Bug] The start(slope) of the bridge is considered to have no height.
Post by: Ranran on February 01, 2021, 01:02:08 PM
(https://i.imgur.com/g1OVrVo.png)

Cities surprise us by building bridges that ignore collisions, but it turns out that it's also feasible for players.

(https://imgur.com/xgA1NMV.gif)
Title: Re: [Bug] The start(slope) of the bridge is considered to have no height.
Post by: Ranran on February 05, 2021, 09:35:37 AM
I've recently made sometimes the code format the same which should be the same as standard in order to prepare the merge work before merging from standard.
At that time I noticed that tool_build_bridge_t::is_valid_pos could have been corrupted for several years.
I'm not sure if this is related to this thread.


https://github.com/jamespetts/simutrans-extended/blob/8877dfde5a431504c1bc433e781c9fa4a31902dc/simtool.cc#L3249

Notice the alignment of the two if statements.
Code: [Select]
if(  gr->ist_karten_boden()  ) {
// first click
ribi_t::ribi rw = ribi_t::none;
if (wt==powerline_wt) {
This part is not the same as standard, but the end position of the statement may be strange when compared to standard.
Title: Re: [Bug] The start(slope) of the bridge is considered to have no height.
Post by: Ranran on February 08, 2021, 10:35:25 AM
After a bit of research into that code, the difference from standard was that some commits hadn't been merged yet. It didn't seem to be a problem that the indentation was broken.
As a result of incorporating r9084, 9085 and 9089, this bug seems to have been fixed.
Check pull request # 356. The branch contains some other fixes and changes.