WindLightRefresh added for compliance with Aurora's windlight event system.
This commit is contained in:
@@ -378,6 +378,14 @@
|
||||
<boolean>true</boolean>
|
||||
</map>
|
||||
|
||||
<key>WindLightRefresh</key>
|
||||
<map>
|
||||
<key>flavor</key>
|
||||
<string>llsd</string>
|
||||
<key>trusted-sender</key>
|
||||
<boolean>true</boolean>
|
||||
</map>
|
||||
|
||||
<key>ParcelVoiceInfo</key>
|
||||
<map>
|
||||
<key>flavor</key>
|
||||
@@ -386,7 +394,6 @@
|
||||
<boolean>true</boolean>
|
||||
</map>
|
||||
|
||||
|
||||
<key>ParcelNavigateMedia</key>
|
||||
<map>
|
||||
<key>flavor</key>
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
std::string LLEnvPrefs::getWaterPresetName() const
|
||||
{
|
||||
if (mWaterPresetName.empty())
|
||||
@@ -509,7 +511,8 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
|
||||
mRegionSettingsChangeSignal();
|
||||
|
||||
// reset
|
||||
mInterpNextChangeMessage = false;
|
||||
if (!gHippoGridManager->getConnectedGrid()->isAurora()) // On Aurora, the region says when to refresh
|
||||
mInterpNextChangeMessage = false;
|
||||
}
|
||||
|
||||
void LLEnvManagerNew::onRegionSettingsApplyResponse(bool ok)
|
||||
@@ -698,3 +701,36 @@ void LLEnvManagerNew::onRegionChange(bool interpolate)
|
||||
// Let interested parties know agent region has been changed.
|
||||
mRegionChangeSignal();
|
||||
}
|
||||
|
||||
// Aurora-sim windlight refresh
|
||||
class WindLightRefresh : public LLHTTPNode
|
||||
{
|
||||
/*virtual*/ void post(LLHTTPNode::ResponsePtr response, const LLSD& context, const LLSD& input) const
|
||||
{
|
||||
if (!input || !context || !input.isMap() || !input.has("body"))
|
||||
{
|
||||
llinfos << "malformed WindLightRefresh!" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
//std::string dump = input["body"].asString();
|
||||
//llwarns << dump << llendl;
|
||||
|
||||
LLSD body = input["body"];
|
||||
LLEnvManagerNew *env = &LLEnvManagerNew::instance();
|
||||
|
||||
LLViewerRegion* regionp = gAgent.getRegion();
|
||||
LLUUID region_uuid = regionp ? regionp->getRegionID() : LLUUID::null;
|
||||
|
||||
env->mNewRegionPrefs.clear();
|
||||
env->mCurRegionUUID = region_uuid;
|
||||
|
||||
env->mInterpNextChangeMessage = !body.has("Interpolate") || body["Interpolate"].asInteger() == 1;
|
||||
|
||||
llinfos << "Windlight Refresh, interpolate:" << env->mInterpNextChangeMessage << llendl;
|
||||
env->requestRegionSettings();
|
||||
env->mRegionChangeSignal();
|
||||
}
|
||||
};
|
||||
|
||||
LLHTTPRegistration<WindLightRefresh> gHTTPRegistrationWindLightRefresh("/message/WindLightRefresh");
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
|
||||
#include "llmemory.h"
|
||||
#include "llsd.h"
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLWLParamManager;
|
||||
class LLWaterParamManager;
|
||||
class LLWLAnimator;
|
||||
class WindLightRefresh;
|
||||
|
||||
// generic key
|
||||
struct LLEnvKey
|
||||
@@ -257,6 +257,7 @@ public:
|
||||
bool useRegionWater();
|
||||
|
||||
private:
|
||||
friend class WindLightRefresh;
|
||||
bool useDefaultSky();
|
||||
bool useDefaultWater();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user