From 9a3ab8a6ae24e6e70ed7d69587c44a6fabb0a558 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 13 Jan 2024 10:14:26 +0000 Subject: Minor tidy up --- game/scenary/illuminator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game/scenary/illuminator.cpp b/game/scenary/illuminator.cpp index 3de4e52..7d072f9 100644 --- a/game/scenary/illuminator.cpp +++ b/game/scenary/illuminator.cpp @@ -1,8 +1,7 @@ #include "illuminator.h" #include "gfx/gl/sceneShader.h" #include "gfx/gl/vertexArrayObject.h" -#include "gfx/models/texture.h" -#include "location.h" +#include "gfx/models/texture.h" // IWYU pragma: keep bool Illuminator::SpotLight::persist(Persistence::PersistenceStore & store) @@ -28,6 +27,9 @@ Illuminator::persist(Persistence::PersistenceStore & store) void Illuminator::postLoad() { + if (spotLight.empty() && pointLight.empty()) { + throw std::logic_error {"Illuminator has no lights"}; + } texture = getTexture(); bodyMesh->configureVAO(instanceVAO) .addAttribs(instances.bufferName(), 1); -- cgit v1.2.3