train_cmd.c
changeset 1064 2242cd7419bb
parent 1060 ae9a2238bd80
child 1067 3ba7987a004e
equal deleted inserted replaced
1063:67d38cf7ed26 1064:2242cd7419bb
  2620 
  2620 
  2621 // Validation for the news item "Train is waiting in depot"
  2621 // Validation for the news item "Train is waiting in depot"
  2622 bool ValidateTrainInDepot( uint data_a, uint data_b )
  2622 bool ValidateTrainInDepot( uint data_a, uint data_b )
  2623 {
  2623 {
  2624 	Vehicle *v = GetVehicle(data_a);
  2624 	Vehicle *v = GetVehicle(data_a);
  2625 	if (v->u.rail.track == 0x80 && (v->vehstatus | VS_STOPPED))
  2625 	return  (v->u.rail.track == 0x80 && (v->vehstatus | VS_STOPPED));
  2626 		return true;
       
  2627 	else
       
  2628 		return false;
       
  2629 }
  2626 }
  2630 
  2627 
  2631 void TrainEnterDepot(Vehicle *v, uint tile)
  2628 void TrainEnterDepot(Vehicle *v, uint tile)
  2632 {
  2629 {
  2633 	SetSignalsOnBothDir(tile, _depot_track_ind[_map5[tile]&3]);
  2630 	SetSignalsOnBothDir(tile, _depot_track_ind[_map5[tile]&3]);