Advertisement
Guest User

Untitled

a guest
Aug 28th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.40 KB | None | 0 0
  1. diff -r 6c34330a82a0 src/rail_cmd.cpp
  2. --- a/src/rail_cmd.cpp  Sun Aug 21 14:59:05 2011 +0000
  3. +++ b/src/rail_cmd.cpp  Sun Aug 28 22:04:57 2011 +0200
  4. @@ -2284,9 +2284,6 @@
  5.                     default: break;
  6.                 }
  7.             }
  8. -
  9. -           int depot_sprite = GetCustomRailSprite(rti, ti->tile, RTSG_DEPOT);
  10. -           relocation = depot_sprite != 0 ? depot_sprite - SPR_RAIL_DEPOT_SE_1 : rti->GetRailtypeSpriteOffset();
  11.         } else {
  12.             /* PBS debugging, draw reserved tracks darker */
  13.             if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasDepotReservation(ti->tile)) {
  14. @@ -2298,9 +2295,10 @@
  15.                     default: break;
  16.                 }
  17.             }
  18. +       }
  19.  
  20. -           relocation = rti->GetRailtypeSpriteOffset();
  21. -       }
  22. +       int depot_sprite = GetCustomRailSprite(rti, ti->tile, RTSG_DEPOT);
  23. +       relocation = depot_sprite != 0 ? depot_sprite - SPR_RAIL_DEPOT_SE_1 : rti->GetRailtypeSpriteOffset();
  24.  
  25.         if (HasCatenaryDrawn(GetRailType(ti->tile))) DrawCatenary(ti);
  26.  
  27. @@ -2332,10 +2330,9 @@
  28.             case DIAGDIR_SE: DrawSprite(ground + RTO_Y, PAL_NONE, x, y); break;
  29.             default: break;
  30.         }
  31. -
  32. -       int depot_sprite = GetCustomRailSprite(rti, INVALID_TILE, RTSG_DEPOT);
  33. -       if (depot_sprite != 0) offset = depot_sprite - SPR_RAIL_DEPOT_SE_1;
  34.     }
  35. +   int depot_sprite = GetCustomRailSprite(rti, INVALID_TILE, RTSG_DEPOT);
  36. +   if (depot_sprite != 0) offset = depot_sprite - SPR_RAIL_DEPOT_SE_1;
  37.  
  38.     DrawRailTileSeqInGUI(x, y, dts, offset, 0, palette);
  39.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement