From 5795e8939bcd5e849c5e63e2c443bada03c93a20 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 3 Apr 2026 14:17:38 +0100 Subject: Create mix-ins for handling asset and instance lights --- game/scenary/light.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'game/scenary/light.cpp') 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 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); } -- cgit v1.3