News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Intercity dirt roads ford rivers but industry bridleways build stone bridges

Started by neroden, May 12, 2023, 06:14:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

In 1750 during map generation, intercity roads (old_dirt_road) will build fords, but industry roads (bridleway) will build masonry bridges -- which is weird and annoying! 

I'm trying to trace this down.  The code is calling all the same code paths, the only difference is which road type is passed.  When building the bridleway for industry roads, it's consistently failing the crossing check here in bauer/wegbauer.cc (I inserted the dbg->error message to spot this):

I'm not sure what's going wrong here; I believe it ought to pass the check.  Anyone got any idea what's failing here?

I believe this is why it's building bridges.

    // Do not check crossing permissions when the player
    if((!this_way || !this_way->get_owner() || (player_builder && !this_way->get_owner()->allows_access_to(player_builder->get_player_nr()))) && (!check_crossing(zv,to,wtyp,player_builder)  ||  !check_crossing(-zv,from,wtyp,player_builder)))
    {
+    dbg->error("wegbauer.cc","Crossing check failed going to %s", to->get_pos().get_str());
      return false;
    }
  }
{/code]

prissi

Maybe the top speed does not match? Crossing may not allow the correct speeds?

jamespetts

Quote from: prissi on May 13, 2023, 10:33:34 AMMaybe the top speed does not match? Crossing may not allow the correct speeds?
I suspect that Prissi is correct; this looks as though it is more likely to be a pakset issue.
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.

neroden

As noted elsewhere this was a code bug (and I fixed it and the fix has been committed some time back)