train_cmd.c
changeset 2840 d68a605b2087
parent 2833 0d394d4365fe
child 2844 7a55ad0a6a36
equal deleted inserted replaced
2839:665d7c92448b 2840:d68a605b2087
  3599 {
  3599 {
  3600 	int32 cost = 0;
  3600 	int32 cost = 0;
  3601 
  3601 
  3602 	do {
  3602 	do {
  3603 		const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
  3603 		const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
  3604 		if (rvi->running_cost_base)
  3604 		if (rvi->running_cost_base > 0)
  3605 			cost += rvi->running_cost_base * _price.running_rail[rvi->engclass];
  3605 			cost += rvi->running_cost_base * _price.running_rail[rvi->running_cost_class];
  3606 	} while ( (v=v->next) != NULL );
  3606 	} while ((v = v->next) != NULL);
  3607 
  3607 
  3608 	return cost;
  3608 	return cost;
  3609 }
  3609 }
  3610 
  3610 
  3611 void OnNewDay_Train(Vehicle *v)
  3611 void OnNewDay_Train(Vehicle *v)