The International Simutrans Forum

Simutrans Extended => Pak128.Britain-Ex => Simutrans-Extended paksets => Pak128.Britain-Ex Bug Reports => Topic started by: neroden on May 12, 2023, 06:14:21 PM

Title: Intercity dirt roads ford rivers but industry bridleways build stone bridges
Post by: neroden on May 12, 2023, 06:14:21 PM
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]
Title: Re: Intercity dirt roads ford rivers but industry bridleways build stone bridges
Post by: prissi on May 13, 2023, 10:33:34 AM
Maybe the top speed does not match? Crossing may not allow the correct speeds?
Title: Re: Intercity dirt roads ford rivers but industry bridleways build stone bridges
Post by: jamespetts on May 13, 2023, 12:38:42 PM
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.
Title: Re: Intercity dirt roads ford rivers but industry bridleways build stone bridges
Post by: neroden on May 25, 2024, 05:50:29 AM
As noted elsewhere this was a code bug (and I fixed it and the fix has been committed some time back)