Author Topic: Reversed order of way construction  (Read 445 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH

Reversed order of way construction
« on: July 24, 2017, 10:19:56 AM »
In wegbauer_t::calc_route(), coordinates are set in the route vector in the order that players do so. However, I found that this order is reversed when the tail of the newly constructed roads is connected to other way and the head is not. The order of coordinates is so important in implementing the direction restriction for oneway road. How can I know if the order is reversed or not in wegbauer_t?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8795
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Reversed order of way construction
« Reply #1 on: July 24, 2017, 04:59:38 PM »
As mentioned before: I think the overtaking patch and a oneway way/wayobj patch should be separated. Otherwise it gets more and more difficult to properly merge them.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Reversed order of way construction
« Reply #2 on: July 24, 2017, 06:25:50 PM »
YOu can also reverse the route in calc_route again.
Parsley, sage, rosemary, and maggikraut.

Offline THLeaderH

Re: Reversed order of way construction
« Reply #3 on: July 25, 2017, 12:21:15 AM »
Quote
As mentioned before: I think the overtaking patch and a oneway way/wayobj patch should be separated. Otherwise it gets more and more difficult to properly merge them.
Leaving oneway_mode road itself two way means we have to deal with facing traffic. I found that this becomes a big problem considering city cars. So, oneway road feature should not be removed from OTRP. I'll release the next version, v11, in about a week.
Of course, I update the base of code to the latest version of the trunk to make merging easy. Also, oneway way feature is written in specific files, wegbauer.h, wegbauer.cc, tunnelbauer.h, tunnelbauer.cc, brukenbauer.h, and brukenbauer.cc. When you want to inspect this feature, you have to check these 6 files.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8795
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Reversed order of way construction
« Reply #4 on: August 01, 2017, 10:28:03 AM »
I would see overtaking roads like single lane train lines: It is the task of the player to work them properly. So while I am in favour of merging relaxed overtaking roads, I am not so keen in automatically built single way roads.

Offline THLeaderH

Re: Reversed order of way construction
« Reply #5 on: August 01, 2017, 10:35:15 AM »
Quote
So while I am in favour of merging relaxed overtaking roads, I am not so keen in automatically built single way roads.
Oneway_mode road is always built manually. Automatically built roads such as city roads are always twoway_mode, which means the conventional condition is applied. However, city roads can be oneway_mode automatically only when it is rebuilt from players' roads.