(svn r9683) -Fix [FS#423]: improved loading does not use a huge amount of processing power anymore when having a lot of trains.

This commit is contained in:
rubidium
2007-04-20 08:00:30 +00:00
parent a8350e5fdf
commit fdf86bb4a2
5 changed files with 27 additions and 7 deletions

View File

@@ -1926,6 +1926,18 @@ bool AfterLoadGame()
}
}
if (CheckSavegameVersion(57)) {
Vehicle *v;
/* Added a FIFO queue of vehicles loading at stations */
FOR_ALL_VEHICLES(v) {
if ((v->type != VEH_TRAIN || IsFrontEngine(v)) && // for all locs
!(v->vehstatus & (VS_STOPPED | VS_CRASHED)) && // not stopped or crashed
v->current_order.type == OT_LOADING) { // loading
GetStation(v->last_station_visited)->loading_vehicles.push_back(v);
}
}
}
return true;
}