Hi, I'm trying devel-new branch and noticed that half-height bridges can be built over ways. Vehicles pass under without problems, but the way on top of the bridge cannot be upgraded.
Savegame here: https://uran.webstep.net/~vladki/simutrans/test-bug.sve
Thank you for the report: I should be grateful, however, if you could post bug reports in a new topic, one for each bug. I ask because I use the forum as a sort of bug tracker, so it is important to have this degree of separation. I have split this post into its own thread for this purpose.
Edit: I have managed to reproduce this. Can any of the Standard developers remind me where the part of the code is that checks whether a bridge is half height or full height so that I can track this down more easily?
The only code is to check the z coordinate and check whether the pak enforce double height bridges over ways or not.
Thank you for the reply: that is most helpful. Is that in simtool.cc or bridgebuilder.cc?
Neither. You just compare max_h for a tile (shoud be in simworld.cc) with the curent pos.z of the bridge. This is the current height of the bridge. And example is in the bridge builder too.
if you ignore slopes:
bridge->get_pos().z-welt->lookup_kartenboden(bridge->get_pos().get_2d())->get_pos().z>=welt->get_settings().get_get_way_height_clearance()
Splendid, thank you. I will look into this when I get a moment. That is most helpful.
Looking into this, this is not actually a bug: Pak128.Britain-Ex had simply not defined way_height_clearance = 2. I have now amended that so that it does define way_height_clearance = 2, so it should no longer be possible to build single height bridges over ways.
Thank you for your report!
With the latest (as of 2015-08-09) source and pak128.Britain-experimental, I cannot figure how to actually make a rail or road bridge anymore. The built-in city generator does, but it's not clear what combination of single- or double-height slopes and ways would be required to get a bridge built. Help?
Building bridges is a little different to how it used to be, as you no longer need to (or, indeed, can) build a bridge starting from a way on a slope tile. Instead, a bridge should be dragged accross from the nearest non-slope tile on one side to the nearest non-slope tile on the other side.
Aha! That works, although it requires rather different construction planning. Thanks!