src/train_gui.cpp
changeset 6319 27e68b914d3d
parent 6144 5a0ffbf27ced
child 6524 44e22a9b2c97
equal deleted inserted replaced
6318:5e3cf8b18775 6319:27e68b914d3d
    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 == 0x80) {
    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 		}
    34 	}
    34 	}
    35 
    35