(svn r23074) -Codechange: Add Vehicle::GetEngine() to simplify code.

This commit is contained in:
frosch
2011-11-01 00:21:08 +00:00
parent c366e0d45f
commit 72cd855978
13 changed files with 45 additions and 33 deletions

View File

@@ -251,7 +251,7 @@ bool IsArticulatedVehicleCarryingDifferentCargos(const Vehicle *v, CargoID *carg
*/
void CheckConsistencyOfArticulatedVehicle(const Vehicle *v)
{
const Engine *engine = Engine::Get(v->engine_type);
const Engine *engine = v->GetEngine();
uint32 purchase_refit_union, purchase_refit_intersection;
GetArticulatedRefitMasks(v->engine_type, true, &purchase_refit_union, &purchase_refit_intersection);