The International Simutrans Forum

 

Author Topic: Possible bug with underground signal & network mode  (Read 712 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Possible bug with underground signal & network mode
« 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
Code: [Select]
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(...).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug with underground signal & network mode
« Reply #1 on: February 08, 2013, 12:29:03 AM »
Thank you very much - that is most helpful! Changed as suggested.