The International Simutrans Forum

 

Author Topic: Vehicles fall through newly constructed bridges  (Read 2281 times)

0 Members and 1 Guest are viewing this topic.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1326
Vehicles fall through newly constructed bridges
« on: June 05, 2014, 10:14:52 PM »
If a convoi encounters a bridge that was added after its route was calculated, it'll climb the ramp, then fall through the bridge deck and get stuck with 'no route' below.
Top left of the screenshot shows how the track was before the bridge added.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Vehicles fall through newly constructed bridges
« Reply #1 on: June 12, 2014, 09:35:05 PM »
This only happens when there is a matching way directly under the first tile of the bridge. It is there since version 1 probably, since the route of vehicles is stored in (x,y,z) coordinates.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1326
Re: Vehicles fall through newly constructed bridges
« Reply #2 on: June 13, 2014, 05:39:42 PM »
r7249 completely breaks bridges - vehicles won't transition from the ramp to deck.
I'd tried fixing the original problem before posting, but handling all the possible ground slopes and bridge ramp to bridge deck transitions was resulting in a huge mess of logic. Figured I must be doing it completely wrong, so posted to see if anyone else had a better solution...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Vehicles fall through newly constructed bridges
« Reply #3 on: June 14, 2014, 09:50:10 PM »
This was a bad attempt avoiding get_neighbour. Using this everything seems fine, but the game runs much much slower. But I confined this check to slopes only.
« Last Edit: June 14, 2014, 10:08:34 PM by prissi »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Vehicles fall through newly constructed bridges
« Reply #4 on: June 14, 2014, 11:18:58 PM »
Could the same happen with tunnels? And would the same fix take care of that?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Vehicles fall through newly constructed bridges
« Reply #5 on: June 15, 2014, 09:27:22 PM »
Since it checks now connetions it could. But then is will have all sorts of troubles with curves before slopes.