News:

Want to praise Simutrans?
Your feedback is important for us ;D.

[Bug] The start(slope) of the bridge is considered to have no height.

Started by RESTRICTED ACCOUNT, February 01, 2021, 01:02:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT



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


RESTRICTED ACCOUNT

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.

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.

RESTRICTED ACCOUNT

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.