aircraft_gui.c
changeset 2630 7206058a7e82
parent 2561 233dafd7cf6c
child 2639 eeaefdabfdfd
equal deleted inserted replaced
2629:78f87f273407 2630:7206058a7e82
    75 	}
    75 	}
    76 }
    76 }
    77 
    77 
    78 void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2)
    78 void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2)
    79 {
    79 {
    80 	Vehicle *v;
       
    81 
       
    82 	if (success) {
    80 	if (success) {
    83 		v = GetVehicle(_new_aircraft_id);
    81 		const Vehicle* v = GetVehicle(_new_aircraft_id);
       
    82 
    84 		if (v->tile == _backup_orders_tile) {
    83 		if (v->tile == _backup_orders_tile) {
    85 			_backup_orders_tile = 0;
    84 			_backup_orders_tile = 0;
    86 			RestoreVehicleOrders(v, _backup_orders_data);
    85 			RestoreVehicleOrders(v, _backup_orders_data);
    87 		}
    86 		}
    88 		ShowAircraftViewWindow(v);
    87 		ShowAircraftViewWindow(v);
   506 
   505 
   507 static void AircraftViewWndProc(Window *w, WindowEvent *e)
   506 static void AircraftViewWndProc(Window *w, WindowEvent *e)
   508 {
   507 {
   509 	switch(e->event) {
   508 	switch(e->event) {
   510 	case WE_PAINT: {
   509 	case WE_PAINT: {
   511 		Vehicle *v = GetVehicle(w->window_number);
   510 		const Vehicle* v = GetVehicle(w->window_number);
   512 		uint32 disabled = 1<<8;
   511 		uint32 disabled = 1<<8;
   513 		StringID str;
   512 		StringID str;
   514 
   513 
   515 		{
   514 		{
   516 			TileIndex tile = v->tile;
   515 			TileIndex tile = v->tile;