src/train_cmd.cpp
changeset 9118 bf19f7f901bc
parent 9116 6c4b16c2ebea
child 9122 bc3651767850
equal deleted inserted replaced
9117:5aaa21219f68 9118:bf19f7f901bc
  3572 	const Vehicle *v = this;
  3572 	const Vehicle *v = this;
  3573 
  3573 
  3574 	do {
  3574 	do {
  3575 		const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
  3575 		const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
  3576 
  3576 
  3577 		byte cost_factor = GetVehicleProperty(v, 0x0D, rvi->running_cost_base);
  3577 		byte cost_factor = GetVehicleProperty(v, 0x0D, rvi->running_cost);
  3578 		if (cost_factor == 0) continue;
  3578 		if (cost_factor == 0) continue;
  3579 
  3579 
  3580 		cost += cost_factor * _price.running_rail[rvi->running_cost_class];
  3580 		cost += cost_factor * _price.running_rail[rvi->running_cost_class];
  3581 	} while ((v = GetNextVehicle(v)) != NULL);
  3581 	} while ((v = GetNextVehicle(v)) != NULL);
  3582 
  3582