Merge branch 'master' into jgrpp

# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_anim_sse2.cpp
#	src/blitter/32bpp_base.cpp
#	src/blitter/32bpp_base.hpp
#	src/ground_vehicle.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/town_cmd.cpp
#	src/vehicle_base.h
#	src/viewport_gui.cppp
This commit is contained in:
Jonathan G Rennison
2018-05-25 18:29:17 +01:00
78 changed files with 619 additions and 207 deletions

View File

@@ -762,7 +762,7 @@ static CompanyID GetPreviewCompany(Engine *e)
CompanyID best_company = INVALID_COMPANY;
/* For trains the cargomask has no useful meaning, since you can attach other wagons */
uint32 cargomask = e->type != VEH_TRAIN ? GetUnionOfArticulatedRefitMasks(e->index, true) : (uint32)-1;
CargoTypes cargomask = e->type != VEH_TRAIN ? GetUnionOfArticulatedRefitMasks(e->index, true) : ALL_CARGOTYPES;
int32 best_hist = -1;
const Company *c;
@@ -1127,7 +1127,9 @@ bool IsEngineRefittable(EngineID engine)
/* Is there any cargo except the default cargo? */
CargoID default_cargo = e->GetDefaultCargoType();
return default_cargo != CT_INVALID && ei->refit_mask != 1U << default_cargo;
CargoTypes default_cargo_mask = 0;
SetBit(default_cargo_mask, default_cargo);
return default_cargo != CT_INVALID && ei->refit_mask != default_cargo_mask;
}
/**