Feature: Railtype flags to allow/disallow 90 degree curves. (#7352)

This commit is contained in:
Michael Lutz
2019-03-10 09:12:47 +01:00
committed by PeterN
parent 26b0615c47
commit cc5f175615
5 changed files with 43 additions and 15 deletions

View File

@@ -157,7 +157,7 @@ struct CFollowTrackT
return false;
}
if (!Allow90degTurns()) {
if ((!IsRailTT() && !Allow90degTurns()) || (IsRailTT() && Rail90DegTurnDisallowed(GetTileRailType(m_old_tile), GetTileRailType(m_new_tile), !Allow90degTurns()))) {
m_new_td_bits &= (TrackdirBits)~(int)TrackdirCrossesTrackdirs(m_old_td);
if (m_new_td_bits == TRACKDIR_BIT_NONE) {
m_err = EC_90DEG;