News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Reversed order of way construction

Started by THLeaderH, July 24, 2017, 10:19:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

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?

prissi

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.

Dwachs

YOu can also reverse the route in calc_route again.
Parsley, sage, rosemary, and maggikraut.

THLeaderH

QuoteAs 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.

prissi

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.

THLeaderH

QuoteSo 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.