summaryrefslogtreecommitdiff
path: root/game/scenary/light.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-04-03 14:17:38 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-04-03 14:17:38 +0100
commit5795e8939bcd5e849c5e63e2c443bada03c93a20 (patch)
treeae7b9297ce96135a58b6b121fd1ad62da2defe9d /game/scenary/light.cpp
parentAdd light support to RailVehicleClass (diff)
downloadilt-5795e8939bcd5e849c5e63e2c443bada03c93a20.tar.bz2
ilt-5795e8939bcd5e849c5e63e2c443bada03c93a20.tar.xz
ilt-5795e8939bcd5e849c5e63e2c443bada03c93a20.zip
Create mix-ins for handling asset and instance lightsHEADmain
Diffstat (limited to 'game/scenary/light.cpp')
-rw-r--r--game/scenary/light.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/game/scenary/light.cpp b/game/scenary/light.cpp
index c51efda..455d5b5 100644
--- a/game/scenary/light.cpp
+++ b/game/scenary/light.cpp
@@ -5,12 +5,5 @@ Light::Light(std::shared_ptr<const Illuminator> type, const Location & position)
type {std::move(type)},
instance {this->type->instances.acquire(Renderable::commonLocationData.lock()->acquire(position))}
{
- std::ranges::transform(this->type->spotLight, std::back_inserter(spotLightInstances),
- [spotLights = Renderable::commonSpotLights.lock(), this](const auto & spotLight) {
- return spotLights->acquire(*spotLight, instance->location.index);
- });
- std::ranges::transform(this->type->pointLight, std::back_inserter(pointLightInstances),
- [pointLights = Renderable::commonPointLights.lock(), this](const auto & pointLight) {
- return pointLights->acquire(*pointLight, instance->location.index);
- });
+ lightsEnable(this->type, instance->location.index);
}