summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/scenary/illuminator.cpp6
1 files 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<LocationVertex, &LocationVertex::first, &LocationVertex::second>(instances.bufferName(), 1);