(svn r3105) readded 2 line that should not have been removed in last commit(3104). Now cargo are removed when refitting (like it should)
This commit is contained in:
		@@ -550,6 +550,7 @@ int32 CmdRefitAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
 | 
				
			|||||||
		u = v->next;
 | 
							u = v->next;
 | 
				
			||||||
		mail = (new_cid != CT_PASSENGERS) ? 0 : avi->mail_capacity;
 | 
							mail = (new_cid != CT_PASSENGERS) ? 0 : avi->mail_capacity;
 | 
				
			||||||
		u->cargo_cap = mail;
 | 
							u->cargo_cap = mail;
 | 
				
			||||||
 | 
							v->cargo_count = u->cargo_count = 0;
 | 
				
			||||||
		v->cargo_type = new_cid;
 | 
							v->cargo_type = new_cid;
 | 
				
			||||||
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 | 
							InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1092,6 +1092,7 @@ int32 CmdRefitShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (flags & DC_EXEC) {
 | 
						if (flags & DC_EXEC) {
 | 
				
			||||||
 | 
							v->cargo_count = 0;
 | 
				
			||||||
		v->cargo_type = new_cid;
 | 
							v->cargo_type = new_cid;
 | 
				
			||||||
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 | 
							InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user