(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)
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.
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.