src/train_gui.cpp
branchgamebalance
changeset 9895 7bd07f43b0e3
parent 6524 44e22a9b2c97
child 6676 30aea9ac89bc
equal deleted inserted replaced
9894:70d78ac95d6c 9895:7bd07f43b0e3
    23 	if (!success) return;
    23 	if (!success) return;
    24 
    24 
    25 	// find a locomotive in the depot.
    25 	// find a locomotive in the depot.
    26 	found = NULL;
    26 	found = NULL;
    27 	FOR_ALL_VEHICLES(v) {
    27 	FOR_ALL_VEHICLES(v) {
    28 		if (v->type == VEH_Train && IsFrontEngine(v) &&
    28 		if (v->type == VEH_TRAIN && IsFrontEngine(v) &&
    29 				v->tile == tile &&
    29 				v->tile == tile &&
    30 				v->u.rail.track == TRACK_BIT_DEPOT) {
    30 				v->u.rail.track == TRACK_BIT_DEPOT) {
    31 			if (found != NULL) return; // must be exactly one.
    31 			if (found != NULL) return; // must be exactly one.
    32 			found = v;
    32 			found = v;
    33 		}
    33 		}