SL-10464: A couple last fixes dealing with region crossings. Environment Experiences are still stripped when changing regions. Even if destination region participates in the experience.

meow-7.2.2
Rider Linden 2019-02-14 16:19:39 -08:00
parent e977704875
commit 2108d5ee38
2 changed files with 43 additions and 2 deletions

View File

@ -358,7 +358,14 @@ namespace
virtual ~LLSettingsInjected() {};
typename SETTINGT::ptr_t getSource() const { return this->mSource; }
void setSource(const typename SETTINGT::ptr_t &source) { this->mSource = source; this->setDirtyFlag(true); this->mLastSourceHash = 0; }
void setSource(const typename SETTINGT::ptr_t &source)
{
if (source.get() == this) // do not set a source to itself.
return;
this->mSource = source;
this->setDirtyFlag(true);
this->mLastSourceHash = 0;
}
virtual bool isDirty() const override { return SETTINGT::isDirty() || (this->mSource->isDirty()); }
virtual bool isVeryDirty() const override { return SETTINGT::isVeryDirty() || (this->mSource->isVeryDirty()); }
@ -974,8 +981,11 @@ bool LLEnvironment::isInventoryEnabled() const
void LLEnvironment::onRegionChange()
{
// TODO: Use test experiences rather than full clear.
// if (gAgent.getRegionCapability("ExperienceQuery").empty())
// {
// // for now environmental experiences do not survive region crossings
clearExperienceEnvironment(LLUUID::null, TRANSITION_DEFAULT);
// }
LLViewerRegion* cur_region = gAgent.getRegion();
if (!cur_region)
@ -2971,6 +2981,10 @@ namespace
void DayInjection::animateSkyChange(LLSettingsSky::ptr_t psky, LLSettingsBase::Seconds transition)
{
if (mInjectedSky.get() == psky.get())
{ // An attempt to animate to itself... don't do it.
return;
}
if (transition == LLEnvironment::TRANSITION_INSTANT)
{
mBlenderSky.reset();
@ -3000,6 +3014,10 @@ namespace
void DayInjection::animateWaterChange(LLSettingsWater::ptr_t pwater, LLSettingsBase::Seconds transition)
{
if (mInjectedWater.get() == pwater.get())
{ // An attempt to animate to itself. Bad idea.
return;
}
if (transition == LLEnvironment::TRANSITION_INSTANT)
{
mBlenderWater.reset();

View File

@ -176,6 +176,18 @@
top_delta="15"
width="250"
can_edit_text="true"/>
<check_box
control_name="sunbeacon"
width="60"
height="16"
label="Show Beacon"
layout="topleft"
name="sunbeacon"
right="-50"
bottom="-10"
follows="bottom|right"/>
</layout_panel>
<layout_panel
border="false"
@ -287,6 +299,17 @@
top_delta="15"
width="130"
can_edit_text="true"/>
<check_box
control_name="moonbeacon"
width="60"
height="16"
label="Show Beacon"
layout="topleft"
name="moonbeacon"
right="-50"
bottom="-10"
follows="bottom|right"/>
</layout_panel>
</layout_stack>
</layout_panel>