summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-04 15:12:30 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-04 15:12:30 +0000
commitc8ecaaddeee46900540e24e096f86306e77493f7 (patch)
tree9343198cebf2d0c17638b21704d0f39973b9c321 /game
parentRailVehicleClass texture might be null (diff)
downloadilt-c8ecaaddeee46900540e24e096f86306e77493f7.tar.bz2
ilt-c8ecaaddeee46900540e24e096f86306e77493f7.tar.xz
ilt-c8ecaaddeee46900540e24e096f86306e77493f7.zip
Load length, wheelBase and maxSpeed RailVehicleClass properties from XML
Adjusts bogie position to appear correct according to wheelBase
Diffstat (limited to 'game')
-rw-r--r--game/vehicles/railVehicleClass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp
index c0740cc..90a06bd 100644
--- a/game/vehicles/railVehicleClass.cpp
+++ b/game/vehicles/railVehicleClass.cpp
@@ -44,7 +44,8 @@ RailVehicleClass::RailVehicleClass() { }
bool
RailVehicleClass::persist(Persistence::PersistenceStore & store)
{
- return STORE_TYPE && STORE_MEMBER(maxSpeed) && STORE_NAME_HELPER("bogie", bogies, Asset::MeshArrayConstruct)
+ return STORE_TYPE && STORE_MEMBER(length) && STORE_MEMBER(wheelBase) && STORE_MEMBER(maxSpeed)
+ && STORE_NAME_HELPER("bogie", bogies, Asset::MeshArrayConstruct)
&& STORE_HELPER(bodyMesh, Asset::MeshConstruct) && Asset::persist(store);
}