Changeset - r16073:ea3fc2143f27
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-09-09 14:39:48
rubidium@openttd.org
(svn r20776) -Codechange: make VehicleLists for the group "ALL_GROUP" work as well
1 file changed with 12 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/vehiclelist.cpp
Show inline comments
 
@@ -139,6 +139,18 @@ bool GenerateVehicleSortList(VehicleList
 
			}
 
			break;
 

	
 
		case VL_GROUP_LIST:
 
			if (vli.index != ALL_GROUP) {
 
				FOR_ALL_VEHICLES(v) {
 
					if (v->type == vli.vtype && v->IsPrimaryVehicle() &&
 
							v->owner == vli.company && v->group_id == vli.index) {
 
						*list->Append() = v;
 
					}
 
				}
 
				break;
 
			}
 
			/* FALL THROUGH */
 

	
 
		case VL_STANDARD:
 
			FOR_ALL_VEHICLES(v) {
 
				if (v->type == vli.vtype && v->owner == vli.company && v->IsPrimaryVehicle()) {
 
@@ -162,15 +174,6 @@ bool GenerateVehicleSortList(VehicleList
 
			}
 
			break;
 

	
 
		case VL_GROUP_LIST:
 
			FOR_ALL_VEHICLES(v) {
 
				if (v->type == vli.vtype && v->IsPrimaryVehicle() &&
 
						v->owner == vli.company && v->group_id == vli.index) {
 
					*list->Append() = v;
 
				}
 
			}
 
			break;
 

	
 
		default: return false;
 
	}
 

	
0 comments (0 inline, 0 general)