changeset 14246:bb74cb757ae4 draft

(svn r18797) -Fix (r18781): building wagons didn't add them to a train
author rubidium <rubidium@openttd.org>
date Wed, 13 Jan 2010 21:49:15 +0000
parents 9f8dd2ab8135
children de5e89505e06
files src/build_vehicle_gui.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -1034,7 +1034,7 @@
 			case BUILD_VEHICLE_WIDGET_BUILD: {
 				EngineID sel_eng = this->sel_engine;
 				if (sel_eng != INVALID_ENGINE) {
-					CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? NULL : CcBuildPrimaryVehicle;
+					CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle;
 					DoCommandP(this->window_number, sel_eng, 0, GetCmdBuildVeh(this->vehicle_type), callback);
 				}
 				break;