equal
deleted
inserted
replaced
148 |
148 |
149 void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2) |
149 void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2) |
150 { |
150 { |
151 const Vehicle* v; |
151 const Vehicle* v; |
152 |
152 |
153 if (!success) |
153 if (!success) return; |
154 return; |
|
155 |
154 |
156 v = GetVehicle(_new_train_id); |
155 v = GetVehicle(_new_train_id); |
157 if (tile == _backup_orders_tile) { |
156 if (tile == _backup_orders_tile) { |
158 _backup_orders_tile = 0; |
157 _backup_orders_tile = 0; |
159 RestoreVehicleOrders(v, _backup_orders_data); |
158 RestoreVehicleOrders(v, _backup_orders_data); |
161 ShowTrainViewWindow(v); |
160 ShowTrainViewWindow(v); |
162 } |
161 } |
163 |
162 |
164 void CcCloneTrain(bool success, uint tile, uint32 p1, uint32 p2) |
163 void CcCloneTrain(bool success, uint tile, uint32 p1, uint32 p2) |
165 { |
164 { |
166 if (success) { |
165 if (success) ShowTrainViewWindow(GetVehicle(_new_train_id)); |
167 const Vehicle* v = GetVehicle(_new_train_id); |
|
168 |
|
169 ShowTrainViewWindow(v); |
|
170 } |
|
171 } |
166 } |
172 |
167 |
173 static void engine_drawing_loop(int *x, int *y, int *pos, int *sel, |
168 static void engine_drawing_loop(int *x, int *y, int *pos, int *sel, |
174 EngineID* selected_id, RailType railtype, byte show_max, bool is_engine) |
169 EngineID* selected_id, RailType railtype, byte show_max, bool is_engine) |
175 { |
170 { |