summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-23 18:28:46 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-23 18:28:46 +0000
commit74850a771249f25e01b7c4f6efee07b99e101c47 (patch)
tree6c8197b8f8c09fa9713b9e15c19a923ac3d85922
parent61611711e39630308b0742fb890a2fc240d6ddc7 (diff)
downloadopenttd-74850a771249f25e01b7c4f6efee07b99e101c47.tar.xz
(svn r6909) - Codechange: Base the decision to draw rail engine or wagon purchase information on the rail vehicle type, not an arbitrary value.
-rw-r--r--vehicle_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index b1b455b65..f171e8435 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -990,11 +990,11 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
}
}
-static void DrawVehiclePurchaseInfo(const int x, const int y, const EngineID engine_number, const bool draw_locomotive)
+static void DrawVehiclePurchaseInfo(const int x, const int y, const EngineID engine_number)
{
switch (GetEngine(engine_number)->type) {
case VEH_Train:
- if (draw_locomotive) {
+ if ((RailVehInfo(engine_number)->flags & RVI_WAGON) == 0) {
DrawTrainEnginePurchaseInfo(x, y, engine_number);
} else {
DrawTrainWagonPurchaseInfo(x, y, engine_number);
@@ -1090,7 +1090,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e)
/* now we draw the info about the vehicles we selected */
for (i = 0 ; i < 2 ; i++) {
if (selected_id[i] != INVALID_ENGINE) {
- DrawVehiclePurchaseInfo((i == 1) ? 230 : 2 , 15 + (w->resize.step_height * w->vscroll.cap), selected_id[i], WP(w, replaceveh_d).wagon_btnstate);
+ DrawVehiclePurchaseInfo((i == 1) ? 230 : 2 , 15 + (w->resize.step_height * w->vscroll.cap), selected_id[i]);
}
}
} break; // end of paint