News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Possible bug with underground signal & network mode

Started by Dwachs, February 07, 2013, 07:39:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

This change

https://github.com/jamespetts/simutrans-experimental/commit/e7922a3133ad8a909c804831c9d982c41652f7d3

is targeted on underground signals. As it is implemented, the outcome of the check depends on the local clients underground mode setting. Thus, it is prone to network failures. Rather the check should be

if (welt->lookup_kartenboden(pos.get_2d())->get_hoehe() > pos.z) {
// signal want to be build underground
}
else {
// over ground
}

This applies also to the check in wkz_marker_t::work.

You can check for underground mode in check_pos(...) but not in work(...) or init(...).
Parsley, sage, rosemary, and maggikraut.

jamespetts

Thank you very much - that is most helpful! Changed as suggested.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.