diff options
author | tron <tron@openttd.org> | 2004-12-04 07:41:37 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-04 07:41:37 +0000 |
commit | d036559e0ed75f6357e129f2d78808240519fc78 (patch) | |
tree | 961ff6aa4a2bbef862d442ea6eb15954eb9d7b96 /train_gui.c | |
parent | aa183e35d8f204f6f8a94a93226f7e700efc036e (diff) | |
download | openttd-d036559e0ed75f6357e129f2d78808240519fc78.tar.xz |
(svn r924) Use RailVehInfo() instead of &_rail_vehicle_info[]
Diffstat (limited to 'train_gui.c')
-rw-r--r-- | train_gui.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/train_gui.c b/train_gui.c index 8c80c7fe2..eac3ca960 100644 --- a/train_gui.c +++ b/train_gui.c @@ -185,7 +185,7 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e) int sel_eng; sel_eng = WP(w,buildtrain_d).sel_engine; if (sel_eng != -1) - DoCommandP(w->window_number, sel_eng, 0, (_rail_vehicle_info[sel_eng].flags & RVI_WAGON) ? CcBuildWagon : CcBuildLoco, CMD_BUILD_RAIL_VEHICLE | CMD_MSG(STR_882B_CAN_T_BUILD_RAILROAD_VEHICLE)); + DoCommandP(w->window_number, sel_eng, 0, (RailVehInfo(sel_eng)->flags & RVI_WAGON) ? CcBuildWagon : CcBuildLoco, CMD_BUILD_RAIL_VEHICLE | CMD_MSG(STR_882B_CAN_T_BUILD_RAILROAD_VEHICLE)); } break; case 6: WP(w,buildtrain_d).rename_engine = WP(w,buildtrain_d).sel_engine; @@ -912,9 +912,7 @@ static void TrainDetailsCargoTab(Vehicle *v, int x, int y) static void TrainDetailsInfoTab(Vehicle *v, int x, int y) { - const RailVehicleInfo *rvi; - - rvi = &_rail_vehicle_info[v->engine_type]; + const RailVehicleInfo *rvi = RailVehInfo(v->engine_type); if (!(rvi->flags & RVI_WAGON)) { SetDParam(0, GetCustomEngineName(v->engine_type)); |