summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingsdaycycle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory/llsettingsdaycycle.cpp')
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 0cfc8c09ca..009d7b06f2 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -26,6 +26,7 @@
*/
#include "llsettingsdaycycle.h"
+#include "llerror.h"
#include <algorithm>
#include <boost/make_shared.hpp>
#include "lltrace.h"
@@ -610,6 +611,20 @@ void LLSettingsDay::setSettingsAtKeyframe(const LLSettingsBase::ptr_t &settings,
return;
}
+ std::string type = settings->getSettingsType();
+ if ((track == TRACK_WATER) && (type != "water"))
+ {
+ LL_WARNS("DAYCYCLE") << "Attempt to add frame of type '" << type << "' to water track!" << LL_ENDL;
+ llassert(type == "water");
+ return;
+ }
+ else if ((track != TRACK_WATER) && (type != "sky"))
+ {
+ LL_WARNS("DAYCYCLE") << "Attempt to add frame of type '" << type << "' to sky track!" << LL_ENDL;
+ llassert(type == "sky");
+ return;
+ }
+
mDayTracks[track][llclamp(keyframe, 0.0f, 1.0f)] = settings;
setDirtyFlag(true);
}