diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-04 14:27:23 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-04 14:27:23 +0000 |
commit | 54ddcd3da0916b6a46f5fcf3f33ff0fbffe375ce (patch) | |
tree | a1a46ac32486375a7b2636e467779916d28c8c4c /game/vehicles/railVehicleClass.cpp | |
parent | Add Asset helpers to construct OpenGL ready meshes from Asset Factory meshes ... (diff) | |
download | ilt-54ddcd3da0916b6a46f5fcf3f33ff0fbffe375ce.tar.bz2 ilt-54ddcd3da0916b6a46f5fcf3f33ff0fbffe375ce.tar.xz ilt-54ddcd3da0916b6a46f5fcf3f33ff0fbffe375ce.zip |
Support and load factory asset directly into a RailVehicleClass instance
Diffstat (limited to 'game/vehicles/railVehicleClass.cpp')
-rw-r--r-- | game/vehicles/railVehicleClass.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp index dff1416..7052396 100644 --- a/game/vehicles/railVehicleClass.cpp +++ b/game/vehicles/railVehicleClass.cpp @@ -39,6 +39,15 @@ RailVehicleClass::RailVehicleClass(std::unique_ptr<ObjParser> o, std::shared_ptr bogies[1] = m.at("Bogie2"); } +RailVehicleClass::RailVehicleClass() { } + +bool +RailVehicleClass::persist(Persistence::PersistenceStore & store) +{ + return STORE_TYPE && STORE_MEMBER(maxSpeed) && STORE_NAME_HELPER("bogie", bogies, Asset::MeshArrayConstruct) + && STORE_HELPER(bodyMesh, Asset::MeshConstruct) && Asset::persist(store); +} + void RailVehicleClass::render( const SceneShader & shader, const Location & location, const std::array<Location, 2> & bl) const |