News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Since r11798: bridges no longer set their max speed

Started by Nazalassa, Yesterday at 04:53:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nazalassa

bad-speed.png

Steps to reproduce - Select a bridge which max speed is not that of any way (e.g the 100 km/h bridge of pak64). Build a bridge. Use the inspection tool on the middle of the bridge. The reported speed is incorrect.

Proposed fix: in src/simutrans/obj/bruecke.cc, line 200 is:
        if(desc->get_waytype()!=powerline_wt  &&  gr->get_typ()==grund_t::boden) {
Removing the second condition (which was added in r11798) solves the bug:
        if(desc->get_waytype()!=powerline_wt) {
though I cannot explain why.
Making paks since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars | Pneumatic tubes | More pak64 vehicles and industries

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.

prissi

Indeed, the check for ground looks wrong. In this case, the check is only done for the slopes, not the bridge itself. Submitted, thank you.

(Also that patch was full of the stupid reformating from MSVC, I really hate the current versions.)