(svn r21299) -Fix (r21263): a road vehicle in a depot or wormhole could get into an incorrect state upon savegame conversion causing it to break up later in the game
This commit is contained in:
@@ -2380,6 +2380,8 @@ bool AfterLoadGame()
|
|||||||
if (IsSavegameVersionBefore(153)) {
|
if (IsSavegameVersionBefore(153)) {
|
||||||
RoadVehicle *rv;
|
RoadVehicle *rv;
|
||||||
FOR_ALL_ROADVEHICLES(rv) {
|
FOR_ALL_ROADVEHICLES(rv) {
|
||||||
|
if (rv->state == RVSB_IN_DEPOT || rv->state == RVSB_WORMHOLE) continue;
|
||||||
|
|
||||||
bool loading = rv->current_order.IsType(OT_LOADING) || rv->current_order.IsType(OT_LEAVESTATION);
|
bool loading = rv->current_order.IsType(OT_LOADING) || rv->current_order.IsType(OT_LEAVESTATION);
|
||||||
if (HasBit(rv->state, RVS_IN_ROAD_STOP)) {
|
if (HasBit(rv->state, RVS_IN_ROAD_STOP)) {
|
||||||
extern const byte _road_stop_stop_frame[];
|
extern const byte _road_stop_stop_frame[];
|
||||||
|
Reference in New Issue
Block a user