(svn r14096) -Codechange: merge the shared order's vehicle list management to a single location.

This commit is contained in:
rubidium
2008-08-17 19:56:17 +00:00
parent ca3f1f6406
commit abd9f74871
9 changed files with 118 additions and 113 deletions

View File

@@ -263,7 +263,7 @@ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, uint32 flags, uint32 p1, ui
if (v->group_id != id_g) continue;
/* For each shared vehicles add it to the group */
for (Vehicle *v2 = GetFirstVehicleFromSharedList(v); v2 != NULL; v2 = v2->next_shared) {
for (Vehicle *v2 = v->FirstShared(); v2 != NULL; v2 = v2->NextShared()) {
if (v2->group_id != id_g) CmdAddVehicleGroup(tile, flags, id_g, v2->index);
}
}