The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Dwachs on February 07, 2013, 07:39:40 PM

Title: Possible bug with underground signal & network mode
Post by: Dwachs on February 07, 2013, 07:39:40 PM
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(...).
Title: Re: Possible bug with underground signal & network mode
Post by: jamespetts on February 08, 2013, 12:29:03 AM
Thank you very much - that is most helpful! Changed as suggested.