From c8ecaaddeee46900540e24e096f86306e77493f7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Mar 2023 15:12:30 +0000 Subject: Load length, wheelBase and maxSpeed RailVehicleClass properties from XML Adjusts bogie position to appear correct according to wheelBase --- game/vehicles/railVehicleClass.cpp | 3 ++- res/brush47.xml | 6 +++--- 2 files changed, 5 insertions(+), 4 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); } diff --git a/res/brush47.xml b/res/brush47.xml index 796641a..9c7d2a8 100644 --- a/res/brush47.xml +++ b/res/brush47.xml @@ -12,7 +12,7 @@ - + @@ -27,10 +27,10 @@ - + - + -- cgit v1.2.3