Loading

Paste #pl3jnl4gc

  1. diff --cc src/company_gui.cpp
  2. index c62c6d61cf,f39b8229c3..0000000000
  3. --- a/src/company_gui.cpp
  4. +++ b/src/company_gui.cpp
  5. @@@ -2194,16 -2219,18 +2219,23 @@@ struct CompanyWindow : Windo
  6.                 uint y = r.top;
  7.  
  8.                 /* Collect rail and road counts. */
  9.  -              uint rail_pices = c->infrastructure.signal;
  10.  +              uint rail_pieces = c->infrastructure.signal;
  11.                 uint road_pieces = 0;
  12. ++<<<<<<< HEAD
  13.  +              for (uint i = 0; i < lengthof(c->infrastructure.rail); i++) rail_pieces += c->infrastructure.rail[i];
  14.  +              for (uint i = 0; i < lengthof(c->infrastructure.road); i++) road_pieces += c->infrastructure.road[i];
  15. ++=======
  16. +               for (uint i = 0; i < lengthof(c->infrastructure.rail); i++) rail_pices += c->infrastructure.rail[i];
  17. +               for (RoadType rt = ROADTYPE_BEGIN; rt < ROADTYPE_END; rt++) {
  18. +                   for (uint i = 0; i < lengthof(c->infrastructure.road[rt]); i++) road_pieces += c->infrastructure.road[rt][i];
  19. +               }
  20. ++>>>>>>> Feature: Add NotRoadTypes (NRT)
  21.  
  22.  -              if (rail_pices == 0 && road_pieces == 0 && c->infrastructure.water == 0 && c->infrastructure.station == 0 && c->infrastructure.airport == 0) {
  23.  +              if (rail_pieces == 0 && road_pieces == 0 && c->infrastructure.water == 0 && c->infrastructure.station == 0 && c->infrastructure.airport == 0) {
  24.                     DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_NONE);
  25.                 } else {
  26.  -                  if (rail_pices != 0) {
  27.  -                      SetDParam(0, rail_pices);
  28.  +                  if (rail_pieces != 0) {
  29.  +                      SetDParam(0, rail_pieces);
  30.                         DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL);
  31.                         y += FONT_HEIGHT_NORMAL;
  32.                     }
  33. diff --cc src/pathfinder/npf/npf.cpp
  34. index 9535ac0636,bdead0d987..0000000000
  35. --- a/src/pathfinder/npf/npf.cpp
  36. +++ b/src/pathfinder/npf/npf.cpp
  37. @@@ -1114,8 -1125,8 +1126,13 @@@ FindDepotData NPFRoadVehicleFindNearest
  38.   {
  39.     Trackdir trackdir = v->GetVehicleTrackdir();
  40.  
  41. ++<<<<<<< HEAD
  42.  +  AyStarUserData user = { v->owner, TRANSPORT_ROAD, INVALID_RAILTYPES, v->compatible_roadtypes };
  43.  +  NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, INVALID_TILE, INVALID_TRACKDIR, false, NULL, &user, 0, max_penalty);
  44. ++=======
  45. +   AyStarUserData user = { v->owner, TRANSPORT_ROAD, INVALID_RAILTYPES, v->rtid.basetype, v->compatible_subtypes };
  46. +   NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, v->tile, ReverseTrackdir(trackdir), false, NULL, &user, 0);
  47. ++>>>>>>> Feature: Add NotRoadTypes (NRT)
  48.  
  49.     if (ftd.best_bird_dist != 0) return FindDepotData();
  50.  
  51. @@@ -1204,8 -1215,8 +1221,13 @@@ FindDepotData NPFTrainFindNearestDepot(
  52.     fstd.reserve_path = false;
  53.  
  54.     assert(trackdir != INVALID_TRACKDIR);
  55. ++<<<<<<< HEAD
  56.  +  AyStarUserData user = { v->owner, TRANSPORT_RAIL, v->compatible_railtypes, ROADTYPES_NONE };
  57.  +  NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, last->tile, trackdir_rev, false, &fstd, &user, NPF_INFINITE_PENALTY, max_penalty);
  58. ++=======
  59. +   AyStarUserData user = { v->owner, TRANSPORT_RAIL, v->compatible_railtypes, INVALID_ROADTYPE, ROADSUBTYPES_NONE };
  60. +   NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, last->tile, trackdir_rev, false, &fstd, &user, NPF_INFINITE_PENALTY);
  61. ++>>>>>>> Feature: Add NotRoadTypes (NRT)
  62.     if (ftd.best_bird_dist != 0) return FindDepotData();
  63.  
  64.     /* Found target */

Comments