diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 10:14:26 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 10:14:26 +0000 |
commit | 9a3ab8a6ae24e6e70ed7d69587c44a6fabb0a558 (patch) | |
tree | be57f26909d49edc393f374438d98b6800857f4a /game/scenary/illuminator.cpp | |
parent | Add old street lamp model (diff) | |
download | ilt-9a3ab8a6ae24e6e70ed7d69587c44a6fabb0a558.tar.bz2 ilt-9a3ab8a6ae24e6e70ed7d69587c44a6fabb0a558.tar.xz ilt-9a3ab8a6ae24e6e70ed7d69587c44a6fabb0a558.zip |
Minor tidy up
Diffstat (limited to 'game/scenary/illuminator.cpp')
-rw-r--r-- | game/scenary/illuminator.cpp | 6 |
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); |