summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-12-22 13:29:15 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-12-22 13:29:15 +0000
commit8b388c4ee59961f4d307c7f9f87641beffb76a53 (patch)
tree208b2fc38be7b8853fb6b746322301d786eddfe1 /game/network/rail.cpp
parentSetHeightOptions surface changed to defaulted pointer (diff)
downloadilt-8b388c4ee59961f4d307c7f9f87641beffb76a53.tar.bz2
ilt-8b388c4ee59961f4d307c7f9f87641beffb76a53.tar.xz
ilt-8b388c4ee59961f4d307c7f9f87641beffb76a53.zip
Expose network base width and surface
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index f226327..dc62cf3 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -1,4 +1,6 @@
#include "rail.h"
+#include "game/gamestate.h"
+#include "game/geoData.h"
#include "network.h"
#include <game/network/network.impl.h> // IWYU pragma: keep
#include <gfx/gl/sceneShader.h>
@@ -169,3 +171,15 @@ RailLinks::render(const SceneShader & shader) const
glBindVertexArray(0);
}
}
+
+const Surface *
+RailLinks::getBaseSurface() const
+{
+ return std::dynamic_pointer_cast<Surface>(gameState->assets.at("terrain.surface.gravel")).get();
+}
+
+RelativeDistance
+RailLinks::getBaseWidth() const
+{
+ return 5'700;
+}