Loading

Paste #padnup7ox

  1. +       /* In diagonal crossings patch, level crossings were changed to store the rail
  2. +        * direction, to allow for diagonal level crossings. We need to add the
  3. +        * rail direction to all existing level crossings. */
  4. +       if (IsSavegameVersionBefore(SLV_DIAG_CROSSINGS)) {
  5. +               for (TileIndex t = 0; t < map_size; t++) {
  6. +                       if (IsLevelCrossingTile(t)) {
  7. +                               Axis road = GetCrossingRoadAxis(t);
  8. +                               Track track = (road == AXIS_Y) ? TRACK_X : TRACK_Y;
  9. +                               _m[t].m5 &= 0xF1;
  10. +                               _m[t].m5 |= track << 1;
  11. +                       }
  12. +               }
  13. +       }
  14. +

Comments