Fix LightShare annoyance for people who don't know what LightShare is
This commit is contained in:
@@ -494,11 +494,13 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
|
||||
// Load region sky presets.
|
||||
LLWLParamManager::instance().refreshRegionPresets();
|
||||
|
||||
// Not possible to assume M7WL should take precidence as OpenSim will send both
|
||||
// bool bOverridden = M7WindlightInterface::getInstance()->hasOverride();
|
||||
bool bOverridden = M7WindlightInterface::getInstance()->hasOverride();
|
||||
|
||||
// If using server settings, update managers.
|
||||
if (getUseRegionSettings())
|
||||
// if (getUseRegionSettings())
|
||||
// [RLVa:KB] - Checked: 2011-08-29 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
if (!bOverridden && (getUseRegionSettings()) && (LLWLParamManager::getInstance()->mAnimator.getIsRunning()) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
updateManagersFromPrefs(mInterpNextChangeMessage);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,22 @@ void M7WindlightInterface::receiveMessage(LLMessageSystem* msg)
|
||||
_PREHASH_ParamList, _PREHASH_Parameter,
|
||||
buf, size, i, 249);
|
||||
|
||||
#if 0
|
||||
std::ostringstream wldump;
|
||||
char hex []= "0123456789abcdefRRRR";
|
||||
for (int i = 0; i<250; ++i){
|
||||
wldump << "\\x" << hex[((U8)buf[i]&0xF0)>>4] << hex[(U8)buf[i]&0x0F];
|
||||
}
|
||||
llinfos << "Received LightShare data: " << wldump.str() << llendl;
|
||||
#endif
|
||||
char default_windlight[] = "\x00\x00\x80\x40\x00\x00\x18\x42\x00\x00\x80\x42\x00\x00\x80\x40\x00\x00\x80\x3e\x00\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00\x40\xcd\xcc\xcc\x3e\x00\x00\x00\x3f\x8f\xc2\xf5\x3c\xcd\xcc\x4c\x3e\x0a\xd7\x23\x3d\x66\x66\x86\x3f\x3d\x0a\xd7\xbe\x7b\x14\x8e\x3f\xe1\x7a\x94\xbf\x82\x2d\xed\x49\x9a\x6c\xf6\x1c\xcb\x89\x6d\xf5\x4f\x42\xcd\xf4\x00\x00\x80\x3e\x00\x00\x80\x3e\x0a\xd7\xa3\x3e\x0a\xd7\xa3\x3e\x5c\x8f\x42\x3e\x8f\xc2\xf5\x3d\xae\x47\x61\x3e\x5c\x8f\xc2\x3e\x5c\x8f\xc2\x3e\x33\x33\x33\x3f\xec\x51\x38\x3e\xcd\xcc\x4c\x3f\x8f\xc2\x75\x3e\xb8\x1e\x85\x3e\x9a\x99\x99\x3e\x9a\x99\x99\x3e\xd3\x4d\xa2\x3e\x33\x33\xb3\x3e\x33\x33\xb3\x3e\x33\x33\xb3\x3e\x33\x33\xb3\x3e\x00\x00\x00\x00\xcd\xcc\xcc\x3d\x00\x00\xe0\x3f\x00\x00\x80\x3f\x00\x00\x00\x00\x85\xeb\xd1\x3e\x85\xeb\xd1\x3e\x85\xeb\xd1\x3e\x85\xeb\xd1\x3e\x00\x00\x80\x3f\x14\xae\x07\x3f\x00\x00\x80\x3f\x71\x3d\x8a\x3e\x3d\x0a\xd7\x3e\x00\x00\x80\x3f\x14\xae\x07\x3f\x8f\xc2\xf5\x3d\xcd\xcc\x4c\x3e\x0a\xd7\x23\x3c\x45\x06\x00";
|
||||
if(!memcmp(default_windlight, buf, sizeof(default_windlight)))
|
||||
{
|
||||
llinfos << "LightShare matches default" << llendl;
|
||||
receiveReset();
|
||||
return;
|
||||
}
|
||||
|
||||
LLWaterParamManager::getInstance()->getParamSet("Default", mWater);
|
||||
|
||||
Meta7WindlightPacket* wl = (Meta7WindlightPacket*)buf;
|
||||
@@ -120,6 +136,7 @@ void M7WindlightInterface::receiveMessage(LLMessageSystem* msg)
|
||||
|
||||
void M7WindlightInterface::receiveReset()
|
||||
{
|
||||
llinfos << "Received LightShare reset" << llendl;
|
||||
mHasOverride = false;
|
||||
LLEnvManagerNew::getInstance()->usePrefs();
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
struct M7Color3{
|
||||
M7Color3(){};
|
||||
M7Color3(F32 pRed, F32 pGreen, F32 pBlue)
|
||||
@@ -124,8 +127,8 @@ struct Meta7WindlightPacket {
|
||||
char cloudScrollXLock;
|
||||
char cloudScrollYLock;
|
||||
char drawClassicClouds;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user