302 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2) |
302 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2) |
303 { |
303 { |
304 const Vehicle* v; |
304 const Vehicle* v; |
305 if (!success) return; |
305 if (!success) return; |
306 |
306 |
307 v = GetVehicle(_new_ship_id); |
307 v = GetVehicle(_new_vehicle_id); |
308 if (v->tile == _backup_orders_tile) { |
308 if (v->tile == _backup_orders_tile) { |
309 _backup_orders_tile = 0; |
309 _backup_orders_tile = 0; |
310 RestoreVehicleOrders(v, _backup_orders_data); |
310 RestoreVehicleOrders(v, _backup_orders_data); |
311 } |
311 } |
312 ShowShipViewWindow(v); |
312 ShowShipViewWindow(v); |
313 } |
313 } |
314 |
314 |
315 void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2) |
315 void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2) |
316 { |
316 { |
317 if (success) ShowShipViewWindow(GetVehicle(_new_ship_id)); |
317 if (success) ShowShipViewWindow(GetVehicle(_new_vehicle_id)); |
318 } |
318 } |
319 |
319 |
320 static void NewShipWndProc(Window *w, WindowEvent *e) |
320 static void NewShipWndProc(Window *w, WindowEvent *e) |
321 { |
321 { |
322 switch (e->event) { |
322 switch (e->event) { |