Merge branch 'save_ext' into vehicle_repair_costs-sx
Conflicts: src/saveload/saveload.cpp src/settings_gui.cpp
This commit is contained in:
@@ -19,11 +19,14 @@
|
||||
#include "../effectvehicle_base.h"
|
||||
#include "../company_base.h"
|
||||
#include "../company_func.h"
|
||||
#include "../disaster_vehicle.h"
|
||||
|
||||
#include "saveload.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**
|
||||
* Link front and rear multiheaded engines to each other
|
||||
* This is done when loading a savegame
|
||||
@@ -197,7 +200,8 @@ void UpdateOldAircraft()
|
||||
if (a->subtype == AIR_HELICOPTER) a->Next()->Next()->cur_speed = 32;
|
||||
|
||||
/* set new position x,y,z */
|
||||
SetAircraftPosition(a, gp.x, gp.y, GetAircraftFlyingAltitude(a));
|
||||
GetAircraftFlightLevelBounds(a, &a->z_pos, NULL);
|
||||
SetAircraftPosition(a, gp.x, gp.y, GetAircraftFlightLevel(a));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,7 +398,7 @@ void AfterLoadVehicles(bool part_of_load)
|
||||
Train *t = Train::From(v);
|
||||
if (t->IsFrontEngine() || t->IsFreeWagon()) {
|
||||
t->gcache.last_speed = t->cur_speed; // update displayed train speed
|
||||
t->ConsistChanged(false);
|
||||
t->ConsistChanged(CCF_SAVELOAD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -475,8 +479,8 @@ void AfterLoadVehicles(bool part_of_load)
|
||||
|
||||
v->UpdateDeltaXY(v->direction);
|
||||
v->coord.left = INVALID_COORD;
|
||||
VehicleUpdatePosition(v);
|
||||
VehicleUpdateViewport(v, false);
|
||||
v->UpdatePosition();
|
||||
v->UpdateViewport(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +569,7 @@ void FixupTrainLengths()
|
||||
}
|
||||
|
||||
/* Update all cached properties after moving the vehicle chain around. */
|
||||
Train::From(v)->ConsistChanged(true);
|
||||
Train::From(v)->ConsistChanged(CCF_TRACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -856,8 +860,11 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
|
||||
SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION),
|
||||
SLE_VAR(Vehicle, tick_counter, SLE_UINT8),
|
||||
|
||||
SLE_VAR(DisasterVehicle, image_override, SLE_UINT16),
|
||||
SLE_VAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT16),
|
||||
SLE_CONDVAR(DisasterVehicle, image_override, SLE_FILE_U16 | SLE_VAR_U32, 0, 190),
|
||||
SLE_CONDVAR(DisasterVehicle, image_override, SLE_UINT32, 191, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_FILE_U16 | SLE_VAR_U32, 0, 190),
|
||||
SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT32, 191, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(DisasterVehicle, flags, SLE_UINT8, 194, SL_MAX_VERSION),
|
||||
|
||||
SLE_CONDNULL(16, 2, 143), // old reserved space
|
||||
|
||||
|
Reference in New Issue
Block a user