train_cmd.c
changeset 2840 9038b4ab8c9a
parent 2833 b1e5f44afe06
child 2844 3c0e05cc5f1a
equal deleted inserted replaced
2839:a466d41923d8 2840:9038b4ab8c9a
  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)