File diff r6607:1410c388c54c → r6608:f2d13a751f0b
src/ship_cmd.cpp
Show inline comments
 
@@ -875,12 +875,14 @@ int32 CmdBuildShip(TileIndex tile, uint3
 
		v = new (v) Ship();
 
		v->random_bits = VehicleRandomBits();
 

	
 
		v->vehicle_flags = 0;
 
		if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SETBIT(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
 

	
 
		v->cargo_cap = GetVehicleProperty(v, 0x0D, svi->capacity);
 

	
 
		VehiclePositionChanged(v);
 

	
 
		InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
 
		RebuildVehicleLists();
 
		InvalidateWindow(WC_COMPANY, v->owner);
 
		if (IsLocalPlayer())
 
@@ -1087,13 +1089,13 @@ int32 CmdRefitShip(TileIndex tile, uint3
 
		/* Restore the cargo type */
 
		v->cargo_type = temp_cid;
 
		v->cargo_subtype = temp_subtype;
 
	}
 

	
 
	if (capacity == CALLBACK_FAILED) {
 
		capacity = ShipVehInfo(v->engine_type)->capacity;
 
		capacity = GetVehicleProperty(v, 0x0D, ShipVehInfo(v->engine_type)->capacity);
 
	}
 
	_returned_refit_capacity = capacity;
 

	
 
	cost = 0;
 
	if (IsHumanPlayer(v->owner) && new_cid != v->cargo_type) {
 
		cost = GetRefitCost(v->engine_type);