diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-04-01 20:31:29 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-04-01 20:31:29 +0100 |
| commit | 74a241680dcb8e543c7e2ab70eb0cfe00d01f22a (patch) | |
| tree | 8c20214dbd0f2cc0012e5a7057f72999261c240d /game/scenary/light.cpp | |
| parent | Have Renderable manage all instance lights (diff) | |
| download | ilt-74a241680dcb8e543c7e2ab70eb0cfe00d01f22a.tar.bz2 ilt-74a241680dcb8e543c7e2ab70eb0cfe00d01f22a.tar.xz ilt-74a241680dcb8e543c7e2ab70eb0cfe00d01f22a.zip | |
Move spot/point light persistence wrappers to assetFactory
Diffstat (limited to 'game/scenary/light.cpp')
| -rw-r--r-- | game/scenary/light.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/game/scenary/light.cpp b/game/scenary/light.cpp index bd83f04..c51efda 100644 --- a/game/scenary/light.cpp +++ b/game/scenary/light.cpp @@ -6,12 +6,11 @@ Light::Light(std::shared_ptr<const Illuminator> type, const Location & position) 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 Illuminator::SpotLight::CPtr & spotLight) { + [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 Illuminator::PointLight::CPtr & pointLight) { + [pointLights = Renderable::commonPointLights.lock(), this](const auto & pointLight) { return pointLights->acquire(*pointLight, instance->location.index); }); } |
