summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/vehicles/railVehicle.cpp2
-rw-r--r--game/vehicles/railVehicleClass.cpp7
-rw-r--r--game/vehicles/railVehicleClass.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp
index bcde68f..cbe36a6 100644
--- a/game/vehicles/railVehicle.cpp
+++ b/game/vehicles/railVehicle.cpp
@@ -20,7 +20,7 @@ RailVehicle::render(const SceneShader & shader) const
void
RailVehicle::shadows(const ShadowMapper & shadowMapper) const
{
- rvClass->shadows(shadowMapper, location);
+ rvClass->shadows(shadowMapper, location, bogies);
}
void
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp
index 90a06bd..41ef5e9 100644
--- a/game/vehicles/railVehicleClass.cpp
+++ b/game/vehicles/railVehicleClass.cpp
@@ -64,10 +64,15 @@ RailVehicleClass::render(
}
}
void
-RailVehicleClass::shadows(const ShadowMapper & shadowMapper, const Location & location) const
+RailVehicleClass::shadows(
+ const ShadowMapper & shadowMapper, const Location & location, const std::array<Location, 2> & bl) const
{
shadowMapper.dynamicPoint.use(location);
bodyMesh->Draw();
+ for (auto b = 0U; b < bogies.size(); ++b) {
+ shadowMapper.dynamicPoint.setModel(bl[b]);
+ bogies[b]->Draw();
+ }
}
float
diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h
index c50dacc..a2222fb 100644
--- a/game/vehicles/railVehicleClass.h
+++ b/game/vehicles/railVehicleClass.h
@@ -18,7 +18,7 @@ public:
RailVehicleClass();
void render(const SceneShader &, const Location &, const std::array<Location, 2> &) const;
- void shadows(const ShadowMapper &, const Location &) const;
+ void shadows(const ShadowMapper &, const Location &, const std::array<Location, 2> &) const;
std::array<Mesh::Ptr, 2> bogies;
Mesh::Ptr bodyMesh;