summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llenvironment.cpp336
-rw-r--r--indra/newview/llenvironment.h89
-rw-r--r--indra/newview/lleventpoll.cpp5
-rw-r--r--indra/newview/llstartup.cpp3
-rw-r--r--indra/newview/llviewergenericmessage.cpp24
-rw-r--r--indra/newview/llviewergenericmessage.h1
6 files changed, 395 insertions, 63 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index d8095ad2ce..27b4789dfd 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -281,7 +281,6 @@ namespace
virtual bool operator()(const LLDispatcher *, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override
{
LLSD message;
-
sparam_t::const_iterator it = strings.begin();
if (it != strings.end())
@@ -293,8 +292,8 @@ namespace
LL_WARNS() << "LLExperienceLogDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
}
}
- message[KEY_EXPERIENCEID] = invoice;
+ message[KEY_EXPERIENCEID] = invoice;
// Object Name
if (it != strings.end())
{
@@ -352,7 +351,7 @@ void LLEnvironment::initSingleton()
LLSettingsSky::ptr_t p_default_sky = LLSettingsVOSky::buildDefaultSky();
LLSettingsWater::ptr_t p_default_water = LLSettingsVOWater::buildDefaultWater();
- mCurrentEnvironment = std::make_shared<DayInstance>();
+ mCurrentEnvironment = std::make_shared<DayInstance>(ENV_DEFAULT);
mCurrentEnvironment->setSky(p_default_sky);
mCurrentEnvironment->setWater(p_default_water);
@@ -386,6 +385,43 @@ bool LLEnvironment::canEdit() const
return true;
}
+LLSettingsSky::ptr_t LLEnvironment::getCurrentSky() const
+{
+ LLSettingsSky::ptr_t psky = mCurrentEnvironment->getSky();
+
+ if (!psky && mCurrentEnvironment->getEnvironmentSelection() >= ENV_EDIT)
+ {
+ for (int idx = 0; idx < ENV_END; ++idx)
+ {
+ if (mEnvironments[idx]->getSky())
+ {
+ psky = mEnvironments[idx]->getSky();
+ break;
+ }
+ }
+ }
+ return psky;
+}
+
+LLSettingsWater::ptr_t LLEnvironment::getCurrentWater() const
+{
+ LLSettingsWater::ptr_t pwater = mCurrentEnvironment->getWater();
+
+ if (!pwater && mCurrentEnvironment->getEnvironmentSelection() >= ENV_EDIT)
+ {
+ for (int idx = 0; idx < ENV_END; ++idx)
+ {
+ if (mEnvironments[idx]->getWater())
+ {
+ pwater = mEnvironments[idx]->getWater();
+ break;
+ }
+ }
+ }
+ return pwater;
+}
+
+
void LLEnvironment::getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky)
{
settingsOut.m_skyBottomRadius = psky->getSkyBottomRadius();
@@ -483,7 +519,7 @@ bool LLEnvironment::isInventoryEnabled() const
void LLEnvironment::onRegionChange()
{
- clearEnvironment(ENV_PUSH);
+ clearExperienceEnvironment(LLUUID::null, TRANSITION_DEFAULT);
requestRegion();
}
@@ -545,10 +581,16 @@ bool LLEnvironment::hasEnvironment(LLEnvironment::EnvSelection_t env)
LLEnvironment::DayInstance::ptr_t LLEnvironment::getEnvironmentInstance(LLEnvironment::EnvSelection_t env, bool create /*= false*/)
{
DayInstance::ptr_t environment = mEnvironments[env];
-// if (!environment && create)
if (create)
{
- environment = std::make_shared<DayInstance>();
+ if (environment)
+ environment = environment->clone();
+ else
+ {
+ environment = std::make_shared<DayInstance>(env);
+ if (mMakeBackups && env > ENV_PUSH)
+ environment->setBackup(true);
+ }
mEnvironments[env] = environment;
}
@@ -586,17 +628,27 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
DayInstance::ptr_t environment = getEnvironmentInstance(env, true);
- LLSettingsSky::ptr_t prev_sky = mEnvironments[ENV_DEFAULT]->getSky();
- LLSettingsWater::ptr_t prev_water = mEnvironments[ENV_DEFAULT]->getWater();
- if (mCurrentEnvironment && (ENV_EDIT == env))
- {
- prev_sky = mCurrentEnvironment->getSky() ? mCurrentEnvironment->getSky() : prev_sky;
- prev_water = mCurrentEnvironment->getWater() ? mCurrentEnvironment->getWater() : prev_water;
- }
+// LLSettingsSky::ptr_t prev_sky = mEnvironments[ENV_DEFAULT]->getSky();
+// LLSettingsWater::ptr_t prev_water = mEnvironments[ENV_DEFAULT]->getWater();
+// if (mCurrentEnvironment && (ENV_EDIT == env))
+// {
+// prev_sky = mCurrentEnvironment->getSky() ? mCurrentEnvironment->getSky() : prev_sky;
+// prev_water = mCurrentEnvironment->getWater() ? mCurrentEnvironment->getWater() : prev_water;
+// }
- environment->clear();
- environment->setSky((fixed.first) ? fixed.first : prev_sky);
- environment->setWater((fixed.second) ? fixed.second : prev_water);
+// environment->clear();
+// environment->setSky((fixed.first) ? fixed.first : prev_sky);
+// environment->setWater((fixed.second) ? fixed.second : prev_water);
+ if (fixed.first)
+ environment->setSky(fixed.first);
+ else if (!environment->getSky())
+ environment->setSky(mCurrentEnvironment->getSky());
+
+ if (fixed.second)
+ environment->setWater(fixed.second);
+ else if (!environment->getWater())
+ environment->setWater(mCurrentEnvironment->getWater());
+
if (!mSignalEnvChanged.empty())
@@ -635,19 +687,19 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
else if (settings->getSettingsType() == "sky")
{
fixedEnvironment_t fixedenv(std::static_pointer_cast<LLSettingsSky>(settings), LLSettingsWater::ptr_t());
- if (environment)
- {
- fixedenv.second = environment->getWater();
- }
+// if (environment)
+// {
+// fixedenv.second = environment->getWater();
+// }
setEnvironment(env, fixedenv);
}
else if (settings->getSettingsType() == "water")
{
fixedEnvironment_t fixedenv(LLSettingsSky::ptr_t(), std::static_pointer_cast<LLSettingsWater>(settings));
- if (environment)
- {
- fixedenv.first = environment->getSky();
- }
+// if (environment)
+// {
+// fixedenv.first = environment->getSky();
+// }
setEnvironment(env, fixedenv);
}
}
@@ -810,6 +862,17 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::getSelectedEnvironmentInstance(
return mEnvironments[ENV_DEFAULT];
}
+LLEnvironment::DayInstance::ptr_t LLEnvironment::getSharedEnvironmentInstance()
+{
+ for (S32 idx = ENV_PARCEL; idx < ENV_DEFAULT; ++idx)
+ {
+ if (mEnvironments[idx])
+ return mEnvironments[idx];
+ }
+
+ return mEnvironments[ENV_DEFAULT];
+}
+
void LLEnvironment::updateEnvironment(LLSettingsBase::Seconds transition, bool forced)
{
DayInstance::ptr_t pinstance = getSelectedEnvironmentInstance();
@@ -936,6 +999,11 @@ void LLEnvironment::update(const LLViewerCamera * cam)
mCurrentEnvironment->applyTimeDelta(delta);
+ if (mCurrentEnvironment->getEnvironmentSelection() != ENV_LOCAL)
+ {
+ applyInjectedSettings(mCurrentEnvironment, delta);
+ }
+
// update clouds, sun, and general
updateCloudScroll();
@@ -1731,32 +1799,37 @@ void LLEnvironment::handleEnvironmentPushFull(LLUUID experience_id, LLSD &messag
void LLEnvironment::handleEnvironmentPushPartial(LLUUID experience_id, LLSD &message, F32 transition)
{
+ LLSD settings(message["settings"]);
+
+ if (settings.isUndefined())
+ return;
+ setExperienceEnvironment(experience_id, settings, LLSettingsBase::Seconds(transition));
}
void LLEnvironment::clearExperienceEnvironment(LLUUID experience_id, F32 transition_time)
{
bool update_env(false);
- if (mPushEnvironmentExpId == experience_id)
+ if (hasEnvironment(ENV_PUSH))
{
- mPushEnvironmentExpId.setNull();
-
- if (hasEnvironment(ENV_PUSH))
- {
- update_env |= true;
- clearEnvironment(ENV_PUSH);
- updateEnvironment(LLSettingsBase::Seconds(transition_time));
- }
-
+ update_env |= true;
+ clearEnvironment(ENV_PUSH);
+ updateEnvironment(LLSettingsBase::Seconds(transition_time));
}
- // clear the override queue too.
- // update |= true;
+ setInstanceBackup(false);
+ /*TODO blend these back out*/
+ mSkyExperienceBlends.clear();
+ mWaterExperienceBlends.clear();
+ mCurrentEnvironment->getSky();
- if (update_env)
- updateEnvironment(LLSettingsBase::Seconds(transition_time));
+ injectSettings(experience_id, mSkyExperienceBlends, mSkyOverrides, LLSettingsBase::Seconds(transition_time), false);
+ injectSettings(experience_id, mWaterExperienceBlends, mWaterOverrides, LLSettingsBase::Seconds(transition_time), false);
+
+ mSkyOverrides = LLSD::emptyMap();
+ mWaterOverrides = LLSD::emptyMap();
}
void LLEnvironment::setSharedEnvironment()
@@ -1782,10 +1855,110 @@ void LLEnvironment::setExperienceEnvironment(LLUUID experience_id, LLUUID asset_
void LLEnvironment::setExperienceEnvironment(LLUUID experience_id, LLSD data, F32 transition_time)
{
+ LLSD sky(data["sky"]);
+ LLSD water(data["water"]);
+
+ if (sky.isUndefined() && water.isUndefined())
+ {
+ clearExperienceEnvironment(experience_id, transition_time);
+ return;
+ }
+
+ setInstanceBackup(true);
+
+ if (!sky.isUndefined())
+ injectSettings(experience_id, mSkyExperienceBlends, sky, LLSettingsBase::Seconds(transition_time), true);
+ if (!water.isUndefined())
+ injectSettings(experience_id, mWaterExperienceBlends, water, LLSettingsBase::Seconds(transition_time), true);
+
+}
+
+
+void LLEnvironment::setInstanceBackup(bool dobackup)
+{
+ mMakeBackups = dobackup;
+ for (S32 idx = ENV_PARCEL; idx < ENV_DEFAULT; ++idx)
+ {
+ if (mEnvironments[idx])
+ mEnvironments[idx]->setBackup(dobackup);
+ }
+}
+
+void LLEnvironment::injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin)
+{
+ for (LLSD::map_iterator it = injections.beginMap(); it != injections.endMap(); ++it)
+ {
+ blends.push_back(ExpBlendValue(transition, (*it).first, (*it).second, blendin, -1));
+ }
+
+ std::stable_sort(blends.begin(), blends.end(), [](const ExpBlendValue &a, const ExpBlendValue &b) { return a.mTimeRemaining < b.mTimeRemaining; });
+}
+
+void LLEnvironment::applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta)
+{
+ if ((mSkyOverrides.size() > 0) || (mSkyExperienceBlends.size() > 0))
+ {
+ LLSettingsSky::ptr_t psky = environment->getSky();
+ applyInjectedValues(psky, mSkyOverrides);
+ blendInjectedValues(psky, mSkyExperienceBlends, mSkyOverrides, delta);
+ }
+ if ((mWaterOverrides.size() > 0) || (mWaterExperienceBlends.size() > 0))
+ {
+ LLSettingsWater::ptr_t pwater = environment->getWater();
+ applyInjectedValues(pwater, mWaterOverrides);
+ blendInjectedValues(pwater, mWaterExperienceBlends, mWaterOverrides, delta);
+ }
+}
+
+
+void LLEnvironment::applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection)
+{
+ for (LLSD::map_iterator it = injection.beginMap(); it != injection.endMap(); ++it)
+ {
+ psetting->setValue((*it).first, (*it).second);
+ }
+}
+
+void LLEnvironment::blendInjectedValues(LLSettingsBase::ptr_t psetting, exerienceBlendValues_t &blends, LLSD &overrides, F32Seconds delta)
+{
+ LLSD settings = psetting->getSettings();
+ LLSettingsBase::parammapping_t mappings = psetting->getParameterMap();
+ LLSettingsBase::stringset_t slerps = psetting->getSlerpKeys();
+
+ if (blends.empty())
+ return;
+
+ for (auto &blend : blends)
+ {
+ blend.mTimeRemaining -= delta;
+ LLSettingsBase::BlendFactor mix = std::max(blend.mTimeRemaining / blend.mTransition, 0.0f);
+ if (blend.mBlendIn)
+ mix = 1.0 - mix;
+ mix = std::max(0.0, std::min(mix, 1.0));
+
+ if (blend.mValueInitial.isUndefined())
+ blend.mValueInitial = psetting->getValue(blend.mKeyName);
+ LLSD newvalue = psetting->interpolateSDValue(blend.mKeyName, blend.mValueInitial, blend.mValue, mappings, mix, slerps);
+
+ psetting->setValue(blend.mKeyName, newvalue);
+ }
+
+ auto it = blends.begin();
+ for (; it != blends.end(); ++it)
+ {
+ if ((*it).mTimeRemaining > F32Seconds(0.0f))
+ break;
+ if ((*it).mBlendIn)
+ overrides[(*it).mKeyName] = (*it).mValue;
+ }
+ if (it != blends.begin())
+ {
+ blends.erase(blends.begin(), it);
+ }
}
//=========================================================================
-LLEnvironment::DayInstance::DayInstance() :
+LLEnvironment::DayInstance::DayInstance(EnvSelection_t env) :
mDayCycle(),
mSky(),
mWater(),
@@ -1795,18 +1968,42 @@ LLEnvironment::DayInstance::DayInstance() :
mBlenderWater(),
mInitialized(false),
mType(TYPE_INVALID),
- mSkyTrack(1)
+ mSkyTrack(1),
+ mEnv(env),
+ mBackup(false)
{ }
+
+LLEnvironment::DayInstance::ptr_t LLEnvironment::DayInstance::clone() const
+{
+ ptr_t environment = std::make_shared<DayInstance>(mEnv);
+
+ environment->mDayCycle = mDayCycle;
+ environment->mSky = mSky;
+ environment->mWater = mWater;
+ environment->mDayLength = mDayLength;
+ environment->mDayOffset = mDayOffset;
+ environment->mBlenderSky = mBlenderSky;
+ environment->mBlenderWater = mBlenderWater;
+ environment->mInitialized = mInitialized;
+ environment->mType = mType;
+ environment->mSkyTrack = mSkyTrack;
+
+ return environment;
+}
+
void LLEnvironment::DayInstance::applyTimeDelta(const LLSettingsBase::Seconds& delta)
{
+ bool changed(false);
if (!mInitialized)
initialize();
if (mBlenderSky)
- mBlenderSky->applyTimeDelta(delta);
+ changed |= mBlenderSky->applyTimeDelta(delta);
if (mBlenderWater)
- mBlenderWater->applyTimeDelta(delta);
+ changed |= mBlenderWater->applyTimeDelta(delta);
+ if (mBackup && changed)
+ backup();
}
void LLEnvironment::DayInstance::setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset)
@@ -1843,6 +2040,8 @@ void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
mSky->mReplaced |= different_sky;
mSky->update();
mBlenderSky.reset();
+ if (mBackup)
+ backup();
if (gAtmosphere)
{
@@ -1862,6 +2061,8 @@ void LLEnvironment::DayInstance::setWater(const LLSettingsWater::ptr_t &pwater)
mWater = pwater;
mWater->update();
mBlenderWater.reset();
+ if (mBackup)
+ backup();
}
void LLEnvironment::DayInstance::initialize()
@@ -1903,6 +2104,53 @@ void LLEnvironment::DayInstance::setBlenders(const LLSettingsBlender::ptr_t &sky
mBlenderWater = waterblend;
}
+
+void LLEnvironment::DayInstance::setBackup(bool backupval)
+{
+ if (backupval == mBackup)
+ return;
+
+ mBackup = backupval;
+ LLSettingsSky::ptr_t psky = getSky();
+ if (mBackup)
+ {
+ backup();
+ }
+ else
+ {
+ restore();
+ mBackupSky = LLSD();
+ mBackupWater = LLSD();
+ }
+}
+
+void LLEnvironment::DayInstance::backup()
+{
+ if (!mBackup)
+ return;
+
+ if (mSky)
+ {
+ mBackupSky = mSky->cloneSettings();
+ }
+ if (mWater)
+ {
+ mBackupWater = mWater->cloneSettings();
+ }
+}
+
+void LLEnvironment::DayInstance::restore()
+{
+ if (!mBackupSky.isUndefined() && mSky)
+ {
+ mSky->replaceSettings(mBackupSky);
+ }
+ if (!mBackupWater.isUndefined() && mWater)
+ {
+ mWater->replaceSettings(mBackupWater);
+ }
+}
+
LLSettingsBase::TrackPosition LLEnvironment::DayInstance::secondsToKeyframe(LLSettingsDay::Seconds seconds)
{
return convert_time_to_position(seconds, mDayLength);
@@ -1951,7 +2199,7 @@ void LLEnvironment::DayInstance::animate()
//-------------------------------------------------------------------------
LLEnvironment::DayTransition::DayTransition(const LLSettingsSky::ptr_t &skystart,
const LLSettingsWater::ptr_t &waterstart, LLEnvironment::DayInstance::ptr_t &end, LLSettingsDay::Seconds time) :
- DayInstance(),
+ DayInstance(ENV_NONE),
mStartSky(skystart),
mStartWater(waterstart),
mNextInstance(end),
@@ -2066,3 +2314,5 @@ F64 LLTrackBlenderLoopingManual::getSpanLength(const LLSettingsDay::TrackBound_t
{
return get_wrapping_distance((*bounds.first).first, (*bounds.second).first);
}
+
+//=========================================================================
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index c5ac43704a..47e0f0208b 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -124,8 +124,8 @@ public:
bool canAgentUpdateRegionEnvironment() const;
LLSettingsDay::ptr_t getCurrentDay() const { return mCurrentEnvironment->getDayCycle(); }
- LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); }
- LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); }
+ LLSettingsSky::ptr_t getCurrentSky() const;
+ LLSettingsWater::ptr_t getCurrentWater() const;
static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky);
@@ -221,13 +221,6 @@ public:
void handleEnvironmentPush(LLSD &message);
-protected:
- virtual void initSingleton();
-
-private:
- LLVector4 toCFR(const LLVector3 vec) const;
- LLVector4 toLightNorm(const LLVector3 vec) const;
-
class DayInstance
{
public:
@@ -239,14 +232,16 @@ private:
};
typedef std::shared_ptr<DayInstance> ptr_t;
- DayInstance();
+ DayInstance(EnvSelection_t env);
virtual ~DayInstance() { };
+ ptr_t clone() const;
+
virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta);
- void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset);
- void setSky(const LLSettingsSky::ptr_t &psky);
- void setWater(const LLSettingsWater::ptr_t &pwater);
+ virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset);
+ virtual void setSky(const LLSettingsSky::ptr_t &psky);
+ virtual void setWater(const LLSettingsWater::ptr_t &pwater);
void initialize();
bool isInitialized();
@@ -266,12 +261,24 @@ private:
void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend);
+ EnvSelection_t getEnvironmentSelection() const { return mEnv; }
+
+ void setBackup(bool backup);
+ bool getBackup() const { return mBackup; }
+ bool hasBackupSky() const { return !mBackupSky.isUndefined() || !mBackupWater.isUndefined(); }
+ void backup();
+ void restore();
+
protected:
LLSettingsDay::ptr_t mDayCycle;
LLSettingsSky::ptr_t mSky;
LLSettingsWater::ptr_t mWater;
S32 mSkyTrack;
+ bool mBackup;
+ LLSD mBackupSky;
+ LLSD mBackupWater;
+
InstanceType_t mType;
bool mInitialized;
@@ -282,8 +289,21 @@ private:
LLSettingsBlender::ptr_t mBlenderSky;
LLSettingsBlender::ptr_t mBlenderWater;
+ EnvSelection_t mEnv;
+
LLSettingsBase::TrackPosition secondsToKeyframe(LLSettingsDay::Seconds seconds);
};
+
+ DayInstance::ptr_t getSelectedEnvironmentInstance();
+ DayInstance::ptr_t getSharedEnvironmentInstance();
+
+protected:
+ virtual void initSingleton();
+
+private:
+ LLVector4 toCFR(const LLVector3 vec) const;
+ LLVector4 toLightNorm(const LLVector3 vec) const;
+
typedef std::array<DayInstance::ptr_t, ENV_END> InstanceArray_t;
struct ExpEnvironmentEntry
@@ -337,9 +357,12 @@ private:
S32 mCurrentTrack;
altitude_list_t mTrackAltitudes;
- DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false);
+ LLSD mSkyOverrides;
+ LLSD mWaterOverrides;
+ LLSD mSkyOverrideBlends;
+ LLSD mWaterOverrideBlends;
- DayInstance::ptr_t getSelectedEnvironmentInstance();
+ DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false);
void updateCloudScroll();
@@ -376,6 +399,31 @@ private:
std::string mDayName;
};
+ struct ExpBlendValue
+ {
+ ExpBlendValue(F32Seconds transition, const std::string &keyname, LLSD value, bool blendin, S32 index = -1) :
+ mTransition(transition),
+ mTimeRemaining(transition),
+ mKeyName(keyname),
+ mValue(value),
+ mValueInitial(),
+ mIndex(index),
+ mBlendIn(blendin)
+ {}
+
+ F32Seconds mTransition;
+ F32Seconds mTimeRemaining;
+ std::string mKeyName;
+ LLSD mValue;
+ LLSD mValueInitial;
+ S32 mIndex;
+ bool mBlendIn;
+
+ typedef std::shared_ptr<ExpBlendValue> ptr_t;
+ };
+
+ typedef std::deque<ExpBlendValue> exerienceBlendValues_t;
+
void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply);
void coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply);
void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply);
@@ -394,6 +442,17 @@ private:
void clearExperienceEnvironment(LLUUID experience_id, F32 transition_time);
void setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time);
void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time);
+ void setInstanceBackup(bool dobackup);
+
+ void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin);
+
+ void applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta);
+ void applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection);
+ void blendInjectedValues(LLSettingsBase::ptr_t psetting, exerienceBlendValues_t &blends, LLSD &overrides, F32Seconds delta);
+
+ exerienceBlendValues_t mSkyExperienceBlends;
+ exerienceBlendValues_t mWaterExperienceBlends;
+ bool mMakeBackups;
};
class LLTrackBlenderLoopingManual : public LLSettingsBlender
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 5e0f3ab7f9..299fffd9ab 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -106,6 +106,7 @@ namespace Details
LLSD message;
message["sender"] = mSenderIp;
message["body"] = content["body"];
+
LLMessageSystem::dispatch(msg_name, message);
}
@@ -241,7 +242,7 @@ namespace Details
!result.get("events") ||
!result.get("id"))
{
- LL_WARNS("LLEventPollImpl") << " <" << counter << "> received event poll with no events or id key: " << LLSDXMLStreamer(result) << LL_ENDL;
+ LL_WARNS("LLEventPollImpl") << " <" << counter << "> received event poll with no events or id key: " << result << LL_ENDL;
continue;
}
@@ -254,7 +255,7 @@ namespace Details
}
// was LL_INFOS() but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG
- LL_DEBUGS("LLEventPollImpl") << " <" << counter << "> " << events.size() << "events (id " << LLSDXMLStreamer(acknowledge) << ")" << LL_ENDL;
+ LL_DEBUGS("LLEventPollImpl") << " <" << counter << "> " << events.size() << "events (id " << acknowledge << ")" << LL_ENDL;
LLSD::array_const_iterator i = events.beginArray();
LLSD::array_const_iterator end = events.endArray();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a9a0b89078..9c0e842c30 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2532,7 +2532,8 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFunc("InitiateDownload", process_initiate_download);
msg->setHandlerFunc("LandStatReply", LLFloaterTopObjects::handle_land_reply);
- msg->setHandlerFunc("GenericMessage", process_generic_message);
+ msg->setHandlerFunc("GenericMessage", process_generic_message);
+ msg->setHandlerFunc("LargeGenericMessage", process_large_generic_message);
msg->setHandlerFuncFast(_PREHASH_FeatureDisabled, process_feature_disabled_message);
}
diff --git a/indra/newview/llviewergenericmessage.cpp b/indra/newview/llviewergenericmessage.cpp
index 3df53a4a30..d3de9d72bf 100644
--- a/indra/newview/llviewergenericmessage.cpp
+++ b/indra/newview/llviewergenericmessage.cpp
@@ -70,8 +70,6 @@ void send_generic_message(const std::string& method,
gAgent.sendReliableMessage();
}
-
-
void process_generic_message(LLMessageSystem* msg, void**)
{
LLUUID agent_id;
@@ -93,3 +91,25 @@ void process_generic_message(LLMessageSystem* msg, void**)
<< LL_ENDL;
}
}
+
+void process_large_generic_message(LLMessageSystem* msg, void**)
+{
+ LLUUID agent_id;
+ msg->getUUID("AgentData", "AgentID", agent_id);
+ if (agent_id != gAgent.getID())
+ {
+ LL_WARNS() << "GenericMessage for wrong agent" << LL_ENDL;
+ return;
+ }
+
+ std::string request;
+ LLUUID invoice;
+ LLDispatcher::sparam_t strings;
+ LLDispatcher::unpackLargeMessage(msg, request, invoice, strings);
+
+ if (!gGenericDispatcher.dispatch(request, invoice, strings))
+ {
+ LL_WARNS() << "GenericMessage " << request << " failed to dispatch"
+ << LL_ENDL;
+ }
+}
diff --git a/indra/newview/llviewergenericmessage.h b/indra/newview/llviewergenericmessage.h
index 9d451ec0bc..170f38a485 100644
--- a/indra/newview/llviewergenericmessage.h
+++ b/indra/newview/llviewergenericmessage.h
@@ -38,6 +38,7 @@ void send_generic_message(const std::string& method,
const LLUUID& invoice = LLUUID::null);
void process_generic_message(LLMessageSystem* msg, void**);
+void process_large_generic_message(LLMessageSystem* msg, void**);
extern LLDispatcher gGenericDispatcher;