Mercurial > hg > openttd
changeset 16083:99c9f886233e draft
(svn r20776) -Codechange: make VehicleLists for the group "ALL_GROUP" work as well
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 09 Sep 2010 14:39:48 +0000 |
parents | f12dbf5b5fa0 |
children | aeb134202273 |
files | src/vehiclelist.cpp |
diffstat | 1 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehiclelist.cpp +++ b/src/vehiclelist.cpp @@ -139,6 +139,18 @@ } 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 @@ } 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; }