Merge shyotl, setting include broken (disabled)

This commit is contained in:
Siana Gearz
2010-11-09 15:14:34 +01:00
61 changed files with 3320 additions and 2231 deletions

5
.gitignore vendored
View File

@@ -1,4 +1,9 @@
/installed.xml
/indra/build-*
/indra/tools/vstool/obj/
*.aps
*.suo
*.vshost.exe
/bin/
/bin-release/
/bin

View File

@@ -9,11 +9,11 @@ include(Variables)
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
set(CMAKE_CXX_FLAGS_RELEASE
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG -DSHY_MOD=1")
set(CMAKE_CXX_FLAGS_RELEASESSE2
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG -DSHY_MOD=1")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1 -DSHY_MOD=1")
# Don't bother with a MinSizeRel build.

View File

@@ -436,7 +436,6 @@ S32 LLQueuedThread::processNextRequest()
lockData();
req->setStatus(STATUS_COMPLETE);
req->finishRequest(true);
if ((req->getFlags() & FLAG_AUTO_COMPLETE))

View File

@@ -1564,6 +1564,7 @@ void LLImageGL::setNoDelete()
void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
{
delete [] mPickMask; //Always happens regardless.
mPickMask = NULL;
mPickMaskSize = 0;
@@ -1582,7 +1583,6 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
memset(mPickMask, 0, sizeof(U8) * mPickMaskSize);
U32 pick_bit = 0;
for (S32 y = 0; y < height; y += 2)
{
for (S32 x = 0; x < width; x += 2)

View File

@@ -298,7 +298,7 @@ bool LLTexUnit::bindManual(eTextureType type, U32 texture, bool hasMips)
if(mCurrTexture != texture)
{
gGL.flush();
activate();
enable(type);
mCurrTexture = texture;

View File

@@ -59,6 +59,26 @@
//this defines the current version of the settings file
const S32 CURRENT_VERSION = 101;
//Currently global. Would be better in LLControlGroup... except that that requires LLControlVars to know their parent group.
//Could also pass the setting to each COA var too.. but that's not much better.
//Can't use llcachedcontrol as an alternative as that drags in LLCachedControl constructors that refer to gSavedSettings.. which'll break
// the crashlogger which also includes llxml.lib (unresolved externals).
//So, a global it is!
bool gCOAEnabled = false;
inline LLControlVariable *LLControlVariable::getCOAActive()
{
//if no coa connection, return 'this'
//if per account is ON and this IS a parent, return child var
//if per account is ON and this IS NOT a parent, return 'this'
//if per account is OFF and this IS NOT a parent, return parent var
//if per account is OFF and this IS a parent, return 'this'
if(getCOAConnection() && gCOAEnabled == isCOAParent())
return getCOAConnection();
else
return this;
}
bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b)
{
bool result = false;
@@ -102,12 +122,16 @@ bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b)
LLControlVariable::LLControlVariable(const std::string& name, eControlType type,
LLSD initial, const std::string& comment,
bool persist, bool hidefromsettingseditor)
bool persist, bool hidefromsettingseditor, bool IsCOA)
: mName(name),
mComment(comment),
mType(type),
mPersist(persist),
mHideFromSettingsEditor(hidefromsettingseditor)
mHideFromSettingsEditor(hidefromsettingseditor),
mSignal(new signal_t),
mIsCOA(IsCOA),
mIsCOAParent(false),
mCOAConnectedVar(NULL)
{
if (mPersist && mComment.empty())
{
@@ -188,7 +212,8 @@ void LLControlVariable::setValue(const LLSD& value, bool saved_value)
if(value_changed)
{
mSignal(storable_value);
if(getCOAActive() == this)
(*mSignal)(storable_value);
}
}
@@ -205,6 +230,7 @@ void LLControlVariable::setDefaultValue(const LLSD& value)
mValues[0] = comparable_value;
if(value_changed)
{
if(getCOAActive() == this)
firePropertyChanged();
}
}
@@ -235,6 +261,7 @@ void LLControlVariable::resetToDefault(bool fire_signal)
if(fire_signal)
{
if(getCOAActive() == this)
firePropertyChanged();
}
}
@@ -276,7 +303,13 @@ LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
gSettingsCallMap.push_back(std::pair<std::string, U32>(name.c_str(),1));
}
#endif //PROF_CTRL_CALLS
return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
//return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
LLControlVariable *pFoundVar = (iter != mNameTable.end()) ? iter->second : (LLPointer<LLControlVariable>) NULL;
if(pFoundVar)
return pFoundVar->getCOAActive();
else
return LLPointer<LLControlVariable>();
}
@@ -322,7 +355,7 @@ std::string LLControlGroup::typeEnumToString(eControlType typeenum)
return mTypeString[typeenum];
}
BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor)
BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor, bool IsCOA)
{
LLControlVariable* existing_control = getControl(name);
if (existing_control)
@@ -335,6 +368,7 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type,
LLSD cur_value = existing_control->getValue(); // get the current value
existing_control->setDefaultValue(initial_val); // set the default to the declared value
existing_control->setValue(cur_value); // now set to the loaded value
existing_control->setIsCOA(IsCOA);
}
}
else
@@ -345,7 +379,7 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type,
}
// if not, create the control and add it to the name table
LLControlVariable* control = new LLControlVariable(name, type, initial_val, comment, persist, hidefromsettingseditor);
LLControlVariable* control = new LLControlVariable(name, type, initial_val, comment, persist, hidefromsettingseditor, IsCOA);
mNameTable[name] = control;
return TRUE;
}
@@ -1061,6 +1095,9 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only
U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values)
{
if(mIncludedFiles.find(filename) != mIncludedFiles.end())
return 0; //Already included this file.
std::string name;
LLSD settings;
LLSD control_map;
@@ -1089,6 +1126,24 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
name = (*itr).first;
control_map = (*itr).second;
if(name == "Include")
{
if(control_map.isArray())
{
#if LL_WINDOWS
size_t pos = filename.find_last_of("\\");
#else
size_t pos = filename.find_last_of("/");
#endif
if(pos!=std::string::npos)
{
const std::string dir = filename.substr(0,++pos);
for(LLSD::array_const_iterator array_itr = control_map.beginArray(); array_itr != control_map.endArray(); ++array_itr)
validitems+=loadFromFile(dir+(*array_itr).asString(),set_default_values);
}
}
continue;
}
if(control_map.has("Persist"))
{
persist = control_map["Persist"].asInteger();
@@ -1148,13 +1203,16 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
}
else
{
bool IsCOA = control_map.has("IsCOA") && !!control_map["IsCOA"].asInteger();
declareControl(name,
typeStringToEnum(control_map["Type"].asString()),
control_map["Value"],
control_map["Comment"].asString(),
persist,
hidefromsettingseditor
hidefromsettingseditor,
IsCOA
);
}
++validitems;
@@ -1184,6 +1242,53 @@ void LLControlGroup::applyToAll(ApplyFunctor* func)
}
}
void LLControlGroup::connectCOAVars(LLControlGroup &OtherGroup)
{
LLControlVariable *pCOAVar = NULL;
for (ctrl_name_table_t::iterator iter = mNameTable.begin();
iter != mNameTable.end(); iter++)
{
if(iter->second->isCOA())
{
LLControlVariable *pParent = iter->second;
LLControlVariable *pChild = OtherGroup.getControl(pParent->getName());
if(!pChild)
{
OtherGroup.declareControl(
pParent->getName(),
pParent->type(),
pParent->getDefault(),
pParent->getComment(),
pParent->isPersisted(),
true);
pChild = OtherGroup.getControl(pParent->getName());
}
if(pChild)
{
pParent->setCOAConnect(pChild,true);
pChild->setCOAConnect(pParent,false);
}
}
else if(iter->second->getName() == "AscentStoreSettingsPerAccount")
pCOAVar = iter->second;
}
if(pCOAVar)
{
pCOAVar->getSignal()->connect(boost::bind(&LLControlGroup::handleCOASettingChange, this, _1));
pCOAVar->firePropertyChanged();
}
}
void LLControlGroup::updateCOASetting(bool coa_enabled)
{
for (ctrl_name_table_t::iterator iter = mNameTable.begin();
iter != mNameTable.end(); iter++)
{
if(iter->second->getCOAConnection())
iter->second->getCOAActive()->firePropertyChanged();
}
}
//============================================================================
// First-use
@@ -1233,6 +1338,12 @@ void LLControlGroup::resetWarnings()
}
}
bool LLControlGroup::handleCOASettingChange(const LLSD& newvalue)
{
gCOAEnabled = !!newvalue.asInteger(); //TODO. De-globalize this.
updateCOASetting(gCOAEnabled);
return true;
}
//============================================================================
#ifdef TEST_HARNESS

View File

@@ -38,6 +38,8 @@
#include "llmap.h"
#include "llstring.h"
#include "llrect.h"
#include "v4color.h"
#include "v4coloru.h"
#include "llcontrolgroupreader.h"
@@ -63,12 +65,16 @@
class LLVector3;
class LLVector3d;
class LLColor4;
class LLColor3;
class LLColor4U;
const BOOL NO_PERSIST = FALSE;
// Saved at end of session
class LLControlGroup; //Defined further down
extern LLControlGroup gSavedSettings; //Default control group used in LLCachedControl
extern LLControlGroup gSavedPerAccountSettings; //For ease
typedef enum e_control_type
{
TYPE_U32 = 0,
@@ -99,12 +105,16 @@ private:
bool mHideFromSettingsEditor;
std::vector<LLSD> mValues;
signal_t mSignal;
boost::shared_ptr<signal_t> mSignal; //Signals are non-copyable. Therefore, using a pointer so vars can 'share' signals for COA
//COA stuff:
bool mIsCOA; //To have COA connection set.
bool mIsCOAParent; //if true, use if settingsperaccount is false.
LLControlVariable *mCOAConnectedVar;//Because the two vars refer to eachother, LLPointer would be a circular refrence..
public:
LLControlVariable(const std::string& name, eControlType type,
LLSD initial, const std::string& comment,
bool persist = true, bool hidefromsettingseditor = false);
bool persist = true, bool hidefromsettingseditor = false, bool IsCOA = false);
virtual ~LLControlVariable();
@@ -116,7 +126,7 @@ public:
void resetToDefault(bool fire_signal = false);
signal_t* getSignal() { return &mSignal; }
signal_t* getSignal() { return mSignal.get(); }
bool isDefault() { return (mValues.size() == 1); }
bool isSaveValueDefault();
@@ -136,7 +146,21 @@ public:
void firePropertyChanged()
{
mSignal(mValues.back());
(*mSignal)(mValues.back());
}
//COA stuff
bool isCOA() const { return mIsCOA; }
bool isCOAParent() const { return mIsCOAParent; }
LLControlVariable *getCOAConnection() const { return mCOAConnectedVar; }
LLControlVariable *getCOAActive();
void setIsCOA(bool IsCOA) { mIsCOA=IsCOA; }
void setCOAConnect(LLControlVariable *pConnect, bool IsParent)
{
mIsCOAParent=IsParent;
mCOAConnectedVar=pConnect;
if(!IsParent)
mSignal = pConnect->mSignal; //Share a single signal.
}
private:
LLSD getComparableValue(const LLSD& value);
@@ -155,6 +179,7 @@ protected:
eControlType typeStringToEnum(const std::string& typestr);
std::string typeEnumToString(eControlType typeenum);
std::set<std::string> mIncludedFiles; //To prevent perpetual recursion.
public:
LLControlGroup();
~LLControlGroup();
@@ -168,8 +193,8 @@ public:
virtual void apply(const std::string& name, LLControlVariable* control) = 0;
};
void applyToAll(ApplyFunctor* func);
BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE);
BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE, bool IsCOA = false);
BOOL declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE);
@@ -240,6 +265,160 @@ public:
// Resets all ignorables
void resetWarnings();
//COA stuff
void connectToCOA(LLControlVariable *pConnecter, const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist);
void connectCOAVars(LLControlGroup &OtherGroup);
void updateCOASetting(bool coa_enabled);
bool handleCOASettingChange(const LLSD& newvalue);
};
//! Helper function for LLCachedControl
template <class T>
eControlType get_control_type(const T& in, LLSD& out)
{
llerrs << "Usupported control type: " << typeid(T).name() << "." << llendl;
return TYPE_COUNT;
}
//! Publish/Subscribe object to interact with LLControlGroups.
//! An LLCachedControl instance to connect to a LLControlVariable
//! without have to manually create and bind a listener to a local
//! object.
template <class T>
class LLCachedControl
{
private:
T mCachedValue;
LLPointer<LLControlVariable> mControl;
boost::signals::connection mConnection;
LLControlGroup *mControlGroup;
public:
LLCachedControl(const std::string& name, const T& default_value, LLControlGroup *group, const std::string& comment = "Declared In Code")
{Init(name,default_value,comment,*group);} //for gSavedPerAccountSettings, etc
LLCachedControl(const std::string& name, const T& default_value, LLControlGroup &group, const std::string& comment = "Declared In Code")
{Init(name,default_value,comment,group);} //for LLUI::sConfigGroup, etc
LLCachedControl(const std::string& name,
const T& default_value,
const std::string& comment = "Declared In Code",
LLControlGroup &group = gSavedSettings)
{Init(name,default_value,comment,group);} //for default (gSavedSettings)
private:
void Init( const std::string& name,
const T& default_value,
const std::string& comment,
LLControlGroup &group)
{
mControlGroup = &group;
mControl = mControlGroup->getControl(name);
if(mControl.isNull())
{
declareTypedControl(*mControlGroup, name, default_value, comment);
mControl = mControlGroup->getControl(name);
if(mControl.isNull())
{
llerrs << "The control could not be created!!!" << llendl;
}
mCachedValue = default_value;
}
else
{
handleValueChange(mControl->getValue());
}
if(mConnection.connected())
mConnection.disconnect();
// Add a listener to the controls signal...
// and store the connection...
mConnection = mControl->getSignal()->connect(
boost::bind(&LLCachedControl<T>::handleValueChange, this, _1)
);
}
public:
~LLCachedControl()
{
if(mConnection.connected())
{
mConnection.disconnect();
}
}
LLCachedControl& operator =(const T& newvalue)
{
setTypeValue(*mControl, newvalue);
return *this;
}
operator const T&() const { return mCachedValue; }
/* Sometimes implicit casting doesn't work.
For instance, something like "LLCachedControl<LLColor4> color("blah",LLColor4()); color.getValue();"
will not compile as it will look for the function getValue() in LLCachedControl, which doesn't exist.
Use 'color.get().getValue()' instead if something like this happens.
Manually casting to (const T) would work too, but it's ugly and requires knowledge of LLCachedControl's internals
*/
const T &get() const { return mCachedValue; }
private:
void declareTypedControl(LLControlGroup& group,
const std::string& name,
const T& default_value,
const std::string& comment)
{
LLSD init_value;
eControlType type = get_control_type<T>(default_value, init_value);
if(type < TYPE_COUNT)
{
group.declareControl(name, type, init_value, comment, FALSE);
}
}
void setValue(const LLSD& newvalue) //default behavior
{
mCachedValue = (const T &)newvalue;
}
bool handleValueChange(const LLSD& newvalue)
{
setValue(newvalue);
return true;
}
void setTypeValue(LLControlVariable& c, const T& v)
{
// Implicit conversion from T to LLSD...
c.set(v);
}
};
template <> inline void LLCachedControl<LLColor4>::setValue(const LLSD& newvalue)
{
if(this->mControl->isType(TYPE_COL4U))
this->mCachedValue.set(LLColor4U(newvalue)); //a color4u LLSD cannot be auto-converted to color4.. so do it manually.
else
this->mCachedValue = (const LLColor4 &)newvalue;
}
//Following is actually defined in newview/llviewercontrol.cpp, but extern access is fine (Unless GCC bites me)
template <> eControlType get_control_type<U32>(const U32& in, LLSD& out);
template <> eControlType get_control_type<S32>(const S32& in, LLSD& out);
template <> eControlType get_control_type<F32>(const F32& in, LLSD& out);
template <> eControlType get_control_type<bool> (const bool& in, LLSD& out);
// Yay BOOL, its really an S32.
//template <> eControlType get_control_type<BOOL> (const BOOL& in, LLSD& out)
template <> eControlType get_control_type<std::string>(const std::string& in, LLSD& out);
template <> eControlType get_control_type<LLVector3>(const LLVector3& in, LLSD& out);
template <> eControlType get_control_type<LLVector3d>(const LLVector3d& in, LLSD& out);
template <> eControlType get_control_type<LLRect>(const LLRect& in, LLSD& out);
template <> eControlType get_control_type<LLColor4>(const LLColor4& in, LLSD& out);
template <> eControlType get_control_type<LLColor3>(const LLColor3& in, LLSD& out);
template <> eControlType get_control_type<LLColor4U>(const LLColor4U& in, LLSD& out);
template <> eControlType get_control_type<LLSD>(const LLSD& in, LLSD& out);
#endif

View File

@@ -499,6 +499,7 @@ set(viewer_SOURCE_FILES
rlvmultistringsearch.cpp
rlvextensions.cpp
rlvfloaterbehaviour.cpp
shcommandhandler.cpp
)
# This gets renamed in the packaging step
@@ -966,6 +967,7 @@ set(viewer_HEADER_FILES
rlvmultistringsearch.h
rlvextensions.h
rlvfloaterbehaviour.h
shcommandhandler.h
)
source_group("CMake Rules" FILES ViewerInstall.cmake)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,733 @@
<?xml version="1.0" ?>
<llsd>
<map>
<!-- Ascent-Specific Settings -->
<key>AscentPowerfulWizard</key>
<map>
<key>Comment</key>
<string>User is a bad enough dude.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentUpdateTagsOnLoad</key>
<map>
<key>Comment</key>
<string>Allowed client to update client definitions file.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentUploadSettings</key>
<map>
<key>Comment</key>
<string>Settings for upload browser</string>
<key>Type</key>
<string>LLSD</string>
<key>Value</key>
<map>
<key>ActivePath</key>
<string>None</string>
</map>
</map>
<key>AscentActiveDayCycle</key>
<map>
<key>Comment</key>
<string>Day cycle currently in use</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>Default</string>
</map>
<key>AscentAutoCloseOOC</key>
<map>
<key>Comment</key>
<string>Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentAllowMUpose</key>
<map>
<key>Comment</key>
<string>Allow MU* pose style in chat and IM (with ':' as a synonymous to '/me ')</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentStoreSettingsPerAccount</key>
<map>
<key>Comment</key>
<string>Toggles whether to save certain settings per-account, rather than per-install.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<iAscentCmdLineTP2nteger>0</integer>
</map>
<key>AscentDataSeparator</key>
<map>
<key>Comment</key>
<string>This separates data bits from each other - May be used in multiple locations</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>::</string>
</map>
<key>AscentHideTypingNotification</key>
<map>
<key>Comment</key>
<string>Keep those jerks guessing by hiding your "____ is typing..." message.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowSelfTag</key>
<map>
<key>Comment</key>
<string>Show your own tag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowSelfTagColor</key>
<map>
<key>Comment</key>
<string>Show your own tag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentAlwaysRezInGroup</key>
<map>
<key>Comment</key>
<string>Always rez under the owned land group</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentDisableLogoutScreens</key>
<map>
<key>Comment</key>
<string>Disable logout screen progress bar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentDisableTeleportScreens</key>
<map>
<key>Comment</key>
<string>Disable teleport screens</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentShowLookAt</key>
<map>
<key>Comment</key>
<string>Show Others' Lookat points</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<real>0</real>
</map>
<key>AscentUseStatusColors</key>
<map>
<key>Comment</key>
<string>Show special colors for statuses like Friend, Linden, so on</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<real>0</real>
</map>
<key>AscentAvatarXModifier</key>
<map>
<key>Comment</key>
<string>Avatar position modifier (X)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentAvatarYModifier</key>
<map>
<key>Comment</key>
<string>Avatar position modifier (Y)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentAvatarZModifier</key>
<map>
<key>Comment</key>
<string>Avatar position modifier (Z)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentUseSystemFolder</key>
<map>
<key>Comment</key>
<string>Enables the System folder for setting and non-permanent asset storage.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentSystemTemporary</key>
<map>
<key>Comment</key>
<string>When enabled, temporary uploads are put in the System Asset folder (if System Folder exists).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentShowFriendsTag</key>
<map>
<key>Comment</key>
<string>Show friends client tags as (Friend), and colorize them specially.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentUseTag</key>
<map>
<key>Comment</key>
<string>Broadcast client tag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowIdleTime</key>
<map>
<key>Comment</key>
<string>Show client tags for others.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowOthersTag</key>
<map>
<key>Comment</key>
<string>Show client tags for others.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowOthersTagColor</key>
<map>
<key>Comment</key>
<string>Show avatar names in the color of their client.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentBuildAlwaysEnabled</key>
<map>
<key>Comment</key>
<string>Show build option regardless of whether you can (May not mean you can actually build there)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentDisableMinZoomDist</key>
<map>
<key>Comment</key>
<string>Allows much closer camera zooming.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentFlyAlwaysEnabled</key>
<map>
<key>Comment</key>
<string>Always allow fly (Does actually always allow flight)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentDisplayTotalScriptJumps</key>
<map>
<key>Comment</key>
<string>Shows large changes to the sim script count in chat.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>Ascentnumscriptdiff</key>
<map>
<key>Comment</key>
<string>The delta to spam you the script jump difference</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>100</real>
</map>
<key>Ascentnumscripts</key>
<map>
<key>Comment</key>
<string>temp..</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentBuildPrefs_ActualRoot</key>
<map>
<key>Comment</key>
<string>Center selection on parent prim's center.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentBuildPrefs_PivotIsPercent</key>
<map>
<key>Comment</key>
<string>Would you like the chatbar to be able to be used for command line functions?</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentBuildPrefs_PivotX</key>
<map>
<key>Comment</key>
<string>idfk</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>50.0</real>
</map>
<key>AscentBuildPrefs_PivotY</key>
<map>
<key>Comment</key>
<string>idfk</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>50.0</real>
</map>
<key>AscentBuildPrefs_PivotZ</key>
<map>
<key>Comment</key>
<string>idfk</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>50.0</real>
</map>
<key>AscentCmdLine</key>
<map>
<key>Comment</key>
<string>Would you like the chatbar to be able to be used for command line functions?</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentCmdLineClearChat</key>
<map>
<key>Comment</key>
<string>Clear chat history to stop lag from chat spam</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>clrchat</string>
</map>
<key>AscentCmdLineHeight</key>
<map>
<key>Comment</key>
<string>Teleport to height function command</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>gth</string>
</map>
<key>AscentCmdLinePos</key>
<map>
<key>Comment</key>
<string>Teleport to position function command</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>gtp</string>
</map>
<key>AscentCmdLineGround</key>
<map>
<key>Comment</key>
<string>Teleport to ground function command</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>flr</string>
</map>
<key>AscentCmdLineTeleportHome</key>
<map>
<key>Comment</key>
<string>Teleport to home function command</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>tph</string>
</map>
<key>AscentCmdLineRezPlatform</key>
<map>
<key>Comment</key>
<string>Rez a platform underneath you</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>rezplat</string>
</map>
<key>AscentPlatformSize</key>
<map>
<key>Comment</key>
<string>How wide the rezzed platform will appear to be.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>30</real>
</map>
<key>AscentCmdLineMapTo</key>
<map>
<key>Comment</key>
<string>Teleport to a region by name rapidly</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>mapto</string>
</map>
<key>AscentMapToKeepPos</key>
<map>
<key>Comment</key>
<string>Attempt to arrive in the same location you were at.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentCmdLineDrawDistance</key>
<map>
<key>Comment</key>
<string>Change draw distance quickly</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>dd</string>
</map>
<key>AscentCmdTeleportToCam</key>
<map>
<key>Comment</key>
<string>Teleport to your camera</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>tp2cam</string>
</map>
<key>AscentCmdLineKeyToName</key>
<map>
<key>Comment</key>
<string>Use a fast key to name querry</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>key2name</string>
</map>
<key>AscentCmdLineOfferTp</key>
<map>
<key>Comment</key>
<string>Offer a teleport to target avatar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>offertp</string>
</map>
<key>AscentCmdLineCalc</key>
<map>
<key>Comment</key>
<string>Calculates an expression</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>calc</string>
</map>
<key>AscentCmdLineTP2</key>
<map>
<key>Comment</key>
<string>Teleport to a person by name, partials work.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>tp2</string>
</map>
<key>AscentInstantMessageAnnounceIncoming</key>
<map>
<key>Comment</key>
<string>Start IM window as soon as the person starts typing</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowLookAt</key>
<map>
<key>Comment</key>
<string>Show Others' Lookat points</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<real>0</real>
</map>
<key>AscentUseStatusColors</key>
<map>
<key>Comment</key>
<string>Show special colors for statuses like Friend, Linden, so on</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<real>0</real>
</map>
<key>AscentAvatarXModifier</key>
<map>
<key>Comment</key>
<string>Avatar position modifier (X)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentAvatarYModifier</key>
<map>
<key>Comment</key>
<string>Avatar position modifier (Y)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentAvatarZModifier</key>
<map>
<key>Comment</key>
<string>Avatar position modifier (Z)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>AscentUseSystemFolder</key>
<map>
<key>Comment</key>
<string>Enables the System folder for setting and non-permanent asset storage.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentSystemTemporary</key>
<map>
<key>Comment</key>
<string>When enabled, temporary uploads are put in the System Asset folder (if System Folder exists).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentShowFriendsTag</key>
<map>
<key>Comment</key>
<string>Show friends client tags as (Friend), and colorize them specially.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentUseTag</key>
<map>
<key>Comment</key>
<string>Broadcast client tag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowIdleTime</key>
<map>
<key>Comment</key>
<string>Show client tags for others.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowOthersTag</key>
<map>
<key>Comment</key>
<string>Show client tags for others.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentShowOthersTagColor</key>
<map>
<key>Comment</key>
<string>Show avatar names in the color of their client.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,117 @@
<llsd>
<map>
<!-- Ascent Account-Specific (Always) -->
<key>AscentContactGroups</key>
<map>
<key>Comment</key>
<string>List for contact groups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>LLSD</string>
<key>Value</key>
<array>
<string />
</array>
</map>
<key>AscentInstantMessageResponse</key>
<map>
<key>Comment</key>
<string>Auto response to instant messages</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>This is an autoresponse!</string>
</map>
<key>AscentInstantMessageResponseAnyone</key>
<map>
<key>Comment</key>
<string>Whether to auto-respond to anyone</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentInstantMessageResponseFriends</key>
<map>
<key>Comment</key>
<string>Whether to auto-respond to non-friends</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentInstantMessageResponseItem</key>
<map>
<key>Comment</key>
<string>Whether to send a item along with the autoresponse</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentInstantMessageResponseItemData</key>
<map>
<key>Comment</key>
<string>UUID</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>AscentInstantMessageResponseMuted</key>
<map>
<key>Comment</key>
<string>Whether to auto-respond to muted people</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentInstantMessageResponseRepeat</key>
<map>
<key>Comment</key>
<string>Whether to keep on resending the autoresponse every line they send</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentInstantMessageShowOnTyping</key>
<map>
<key>Comment</key>
<string>Whether to perform the autorespond the moment they begin to type instead of waiting for a actual message</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentInstantMessageShowResponded</key>
<map>
<key>Comment</key>
<string>Whether to hide IMs entirely from those you have chosen to send autoresponses</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@@ -189,7 +189,7 @@ void LLPrefsAscentSysImpl::refreshValues()
mEnableLLWind = gSavedSettings.getBOOL("WindEnabled");
mEnableClouds = gSavedSettings.getBOOL("CloudsEnabled");
mEnableClassicClouds = gSavedSettings.getBOOL("SkyUseClassicClouds");
mEnableClassicClouds = gSavedSettings.getBOOL("SkyUseClassicClouds");
mSpeedRez = gSavedSettings.getBOOL("SpeedRez");
mSpeedRezInterval = gSavedSettings.getU32("SpeedRezInterval");
@@ -526,4 +526,4 @@ void LLPrefsAscentSys::cancel()
LLPanel* LLPrefsAscentSys::getPanel()
{
return &impl;
}
}

View File

@@ -122,8 +122,8 @@ void LLPrefsAscentVanImpl::onCommitColor(LLUICtrl* ctrl, void* user_data)
{
llinfos << "Recreating color message for tag update." << llendl;
gCOASavedSettings->setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box"));
gCOASavedSettings->setColor4("AscentCustomTagColor", self->childGetValue("custom_tag_color_swatch"));
gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box"));
gSavedSettings.setColor4("AscentCustomTagColor", self->childGetValue("custom_tag_color_swatch"));
gAgent.sendAgentSetAppearance();
gAgent.resetClientTag();
}
@@ -180,7 +180,7 @@ void LLPrefsAscentVanImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
}
BOOL showCustomOptions;
showCustomOptions = gCOASavedSettings->getBOOL("AscentUseCustomTag");
showCustomOptions = gSavedSettings.getBOOL("AscentUseCustomTag");
self->childSetValue("customize_own_tag_check", showCustomOptions);
self->childSetEnabled("custom_tag_label_text", showCustomOptions);
self->childSetEnabled("custom_tag_label_box", showCustomOptions);
@@ -201,23 +201,23 @@ void LLPrefsAscentVanImpl::refreshValues()
//Colors
mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag");
mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor");
mCustomTagOn = gCOASavedSettings->getBOOL("AscentUseCustomTag");
mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag");
mSelectedClient = gCOASavedSettings->getU32("AscentReportClientIndex");
mEffectColor = gCOASavedSettings->getColor4("EffectColor");
mSelectedClient = gSavedSettings.getU32("AscentReportClientIndex");
mEffectColor = gSavedSettings.getColor4("EffectColor");
childSetEnabled("custom_tag_label_text", mCustomTagOn);
childSetEnabled("custom_tag_label_box", mCustomTagOn);
childSetEnabled("custom_tag_color_text", mCustomTagOn);
childSetEnabled("custom_tag_color_swatch", mCustomTagOn);
mCustomTagLabel = gCOASavedSettings->getString("AscentCustomTagLabel");
mCustomTagColor = gCOASavedSettings->getColor4("AscentCustomTagColor");
mFriendColor = gCOASavedSettings->getColor4("AscentFriendColor");
mLindenColor = gCOASavedSettings->getColor4("AscentLindenColor");
mMutedColor = gCOASavedSettings->getColor4("AscentMutedColor");
mEMColor = gCOASavedSettings->getColor4("AscentEstateOwnerColor");
//mCustomColor = gCOASavedSettings->getColor4("MoyMiniMapCustomColor");
mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel");
mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor");
mFriendColor = gSavedSettings.getColor4("AscentFriendColor");
mLindenColor = gSavedSettings.getColor4("AscentLindenColor");
mMutedColor = gSavedSettings.getColor4("AscentMutedColor");
mEMColor = gSavedSettings.getColor4("AscentEstateOwnerColor");
//mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor");
}
void LLPrefsAscentVanImpl::refresh()
@@ -244,21 +244,24 @@ void LLPrefsAscentVanImpl::refresh()
getChild<LLColorSwatchCtrl>("linden_color_swatch")->set(mLindenColor);
getChild<LLColorSwatchCtrl>("muted_color_swatch")->set(mMutedColor);
getChild<LLColorSwatchCtrl>("em_color_swatch")->set(mEMColor);
gCOASavedSettings->setColor4("EffectColor", LLColor4::white);
gCOASavedSettings->setColor4("EffectColor", mEffectColor);
//getChild<LLColorSwatchCtrl>("custom_color_swatch")->set(mCustomColor);
gSavedSettings.setColor4("EffectColor", LLColor4::white);
gSavedSettings.setColor4("EffectColor", mEffectColor);
gCOASavedSettings->setColor4("AscentFriendColor", LLColor4::white);
gCOASavedSettings->setColor4("AscentFriendColor", mFriendColor);
gSavedSettings.setColor4("AscentFriendColor", LLColor4::white);
gSavedSettings.setColor4("AscentFriendColor", mFriendColor);
gCOASavedSettings->setColor4("AscentLindenColor", LLColor4::white);
gCOASavedSettings->setColor4("AscentLindenColor", mLindenColor);
gSavedSettings.setColor4("AscentLindenColor", LLColor4::white);
gSavedSettings.setColor4("AscentLindenColor", mLindenColor);
gCOASavedSettings->setColor4("AscentMutedColor", LLColor4::white);
gCOASavedSettings->setColor4("AscentMutedColor", mMutedColor);
gSavedSettings.setColor4("AscentMutedColor", LLColor4::white);
gSavedSettings.setColor4("AscentMutedColor", mMutedColor);
gCOASavedSettings->setColor4("AscentEstateOwnerColor", LLColor4::white);
gCOASavedSettings->setColor4("AscentEstateOwnerColor", mEMColor);
gSavedSettings.setColor4("AscentEstateOwnerColor", LLColor4::white);
gSavedSettings.setColor4("AscentEstateOwnerColor", mEMColor);
//gSavedSettings.setColor4("MoyMiniMapCustomColor", LLColor4::white);
//gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor);
gAgent.resetClientTag();
}
@@ -270,16 +273,18 @@ void LLPrefsAscentVanImpl::cancel()
childSetValue("tp_sound_check", mPlayTPSound);
childSetValue("disable_logout_screen_check", mShowLogScreens);
gCOASavedSettings->setColor4("EffectColor", LLColor4::white);
gCOASavedSettings->setColor4("EffectColor", mEffectColor);
gCOASavedSettings->setColor4("AscentFriendColor", LLColor4::yellow);
gCOASavedSettings->setColor4("AscentFriendColor", mFriendColor);
gCOASavedSettings->setColor4("AscentLindenColor", LLColor4::yellow);
gCOASavedSettings->setColor4("AscentLindenColor", mLindenColor);
gCOASavedSettings->setColor4("AscentMutedColor", LLColor4::yellow);
gCOASavedSettings->setColor4("AscentMutedColor", mMutedColor);
gCOASavedSettings->setColor4("AscentEstateOwnerColor", LLColor4::yellow);
gCOASavedSettings->setColor4("AscentEstateOwnerColor", mEMColor);
gSavedSettings.setColor4("EffectColor", LLColor4::white);
gSavedSettings.setColor4("EffectColor", mEffectColor);
gSavedSettings.setColor4("AscentFriendColor", LLColor4::yellow);
gSavedSettings.setColor4("AscentFriendColor", mFriendColor);
gSavedSettings.setColor4("AscentLindenColor", LLColor4::yellow);
gSavedSettings.setColor4("AscentLindenColor", mLindenColor);
gSavedSettings.setColor4("AscentMutedColor", LLColor4::yellow);
gSavedSettings.setColor4("AscentMutedColor", mMutedColor);
gSavedSettings.setColor4("AscentEstateOwnerColor", LLColor4::yellow);
gSavedSettings.setColor4("AscentEstateOwnerColor", mEMColor);
//gSavedSettings.setColor4("MoyMiniMapCustomColor", LLColor4::yellow);
//gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor);
}
void LLPrefsAscentVanImpl::apply()
@@ -300,8 +305,8 @@ void LLPrefsAscentVanImpl::apply()
if (client_index != mSelectedClient)
{
client_uuid = combo->getSelectedValue().asString();
gCOASavedSettings->setString("AscentReportClientUUID", client_uuid);
gCOASavedSettings->setU32("AscentReportClientIndex", client_index);
gSavedSettings.setString("AscentReportClientUUID", client_uuid);
gSavedSettings.setU32("AscentReportClientIndex", client_index);
LLVOAvatar* avatar = gAgent.getAvatarObject();
if (!avatar) return;
@@ -313,14 +318,15 @@ void LLPrefsAscentVanImpl::apply()
gSavedSettings.setBOOL("AscentShowSelfTag", childGetValue("show_self_tag_check"));
gSavedSettings.setBOOL("AscentShowSelfTagColor", childGetValue("show_self_tag_color_check"));
gCOASavedSettings->setColor4("EffectColor", childGetValue("effect_color_swatch"));
gCOASavedSettings->setColor4("AscentFriendColor", childGetValue("friend_color_swatch"));
gCOASavedSettings->setColor4("AscentLindenColor", childGetValue("linden_color_swatch"));
gCOASavedSettings->setColor4("AscentMutedColor", childGetValue("muted_color_swatch"));
gCOASavedSettings->setColor4("AscentEstateOwnerColor", childGetValue("em_color_swatch"));
gCOASavedSettings->setBOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check"));
gCOASavedSettings->setString("AscentCustomTagLabel", childGetValue("custom_tag_label_box"));
gCOASavedSettings->setColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch"));
gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch"));
gSavedSettings.setColor4("AscentFriendColor", childGetValue("friend_color_swatch"));
gSavedSettings.setColor4("AscentLindenColor", childGetValue("linden_color_swatch"));
gSavedSettings.setColor4("AscentMutedColor", childGetValue("muted_color_swatch"));
gSavedSettings.setColor4("AscentEstateOwnerColor", childGetValue("em_color_swatch"));
gSavedSettings.setColor4("MoyMiniMapCustomColor", childGetValue("custom_color_swatch"));
gSavedSettings.setBOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check"));
gSavedSettings.setString("AscentCustomTagLabel", childGetValue("custom_tag_label_box"));
gSavedSettings.setColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch"));
refreshValues();
}

View File

@@ -164,15 +164,15 @@ Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
NVIDIA GT 120 .*NVIDIA.*GeForce.*GT.*12.* 2 1
NVIDIA GT 130 .*NVIDIA.*GeForce.*GT.*13.* 3 1
NVIDIA GT 220 .*NVIDIA.*GeForce.*GT.*22.* 3 1
NVIDIA GT 220 .*NVIDIA.*GeForce.*GT.*22.* 3 1
NVIDIA GTS 250 .*NVIDIA.*GeForce.*GTS.*25.* 3 1
NVIDIA GTX 260 .*NVIDIA.*GeForce.*GTX.*26.* 3 1
NVIDIA GTX 270 .*NVIDIA.*GeForce.*GTX.*27.* 3 1
NVIDIA GTX 280 .*NVIDIA.*GeForce.*GTX.*28.* 3 1
NVIDIA GTX 290 .*NVIDIA.*GeForce.*GTX.*29.* 3 1
NVIDIA GTX 460 .*NVIDIA.*GeForce.*GTX.*46.* 3 1
NVIDIA GTX 470 .*NVIDIA.*GeForce.*GTX.*47.* 3 1
NVIDIA GTX 480 .*NVIDIA.*GeForce.*GTX.*48.* 3 1
NVIDIA GTX 460 .*NVIDIA.*GeForce.*GTX.*46.* 3 1
NVIDIA GTX 470 .*NVIDIA.*GeForce.*GTX.*47.* 3 1
NVIDIA GTX 480 .*NVIDIA.*GeForce.*GTX.*48.* 3 1
NVIDIA C51 .*NVIDIA.*C51.* 0 1
NVIDIA G72 .*NVIDIA.*G72.* 1 1
NVIDIA G73 .*NVIDIA.*G73.* 1 1

View File

@@ -479,7 +479,7 @@ void LLAgent::init()
// LLDebugVarMessageBox::show("Camera Lag", &CAMERA_FOCUS_HALF_LIFE, 0.5f, 0.01f);
mEffectColor = gCOASavedSettings->getColor4("EffectColor");
mEffectColor = gSavedSettings.getColor4("EffectColor");
mInitialized = TRUE;
}
@@ -548,7 +548,7 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera)
gMenuHolder->hideMenus();
}
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (change_camera && !freeze_time)
{
changeCameraToDefault();
@@ -794,7 +794,7 @@ BOOL LLAgent::canFly()
if (isGodlike()) return TRUE;
// <edit>
static LLCachedControl<bool> ascent_fly_always_enabled("AscentFlyAlwaysEnabled",false);
static const LLCachedControl<bool> ascent_fly_always_enabled("AscentFlyAlwaysEnabled",false);
if(ascent_fly_always_enabled)
return TRUE;
// </edit>
@@ -1988,7 +1988,7 @@ void LLAgent::cameraOrbitIn(const F32 meters)
mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist;
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (!freeze_time && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
{
// No need to animate, camera is already there.
@@ -6431,7 +6431,7 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
void LLAgent::setTeleportState(ETeleportState state)
{
mTeleportState = state;
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (mTeleportState > TELEPORT_NONE && freeze_time)
{
LLFloaterSnapshot::hide(0);
@@ -7582,7 +7582,7 @@ void LLAgent::sendAgentSetAppearance()
LLColor4 color;
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
{
color = gCOASavedSettings->setColor4("AscentCustomTagColor");
color = gSavedSettings.setColor4("AscentCustomTagColor");
}
else
{

View File

@@ -335,29 +335,17 @@ static std::string gHelperURI;
LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
void idle_afk_check()
{
// check idle timers
static const LLCachedControl<F32> afk_timeout("AFKTimeout",0.f);
//if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout")))
// [RLVa:KB] - Checked: 2009-10-19 (RLVa-1.1.0g) | Added: RLVa-1.1.0g
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
if ( (gAllowIdleAFK || gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) &&
(gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout"))&& (gSavedSettings.getF32("AFKTimeout") > 0))
(gAwayTriggerTimer.getElapsedTimeF32() > afk_timeout) && (afk_timeout > 0))
#else
if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout"))&& (gSavedSettings.getF32("AFKTimeout") > 0))
if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > afk_timeout) && (afk_timeout > 0))
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
{
@@ -366,13 +354,6 @@ void idle_afk_check()
}
// A callback set in LLAppViewer::init()
static void ui_audio_callback(const LLUUID& uuid)
{
@@ -1032,7 +1013,7 @@ bool LLAppViewer::mainLoop()
// Sleep and run background threads
{
LLFastTimer t2(LLFastTimer::FTM_SLEEP);
static LLCachedControl<bool> run_multiple_threads("RunMultipleThreads",false);
static const LLCachedControl<bool> run_multiple_threads("RunMultipleThreads",false);
// yield some time to the os based on command line option
if(mYieldTime >= 0)
@@ -1769,6 +1750,10 @@ bool LLAppViewer::initConfiguration()
return false;
}
//COA vars in gSavedSettings will be linked to gSavedPerAccountSettings entries that will be created if not present.
//Signals will be shared between linked vars.
gSavedSettings.connectCOAVars(gSavedPerAccountSettings);
// - set procedural settings
gSavedSettings.setString("ClientSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
@@ -4095,7 +4080,7 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs)
{
if(secs < 0.0f)
{
static LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
static const LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
secs = mainloop_timeout_default;
}
@@ -4123,7 +4108,7 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
{
if(secs < 0.0f)
{
static LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
static const LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
secs = mainloop_timeout_default;
}

View File

@@ -74,6 +74,10 @@
#include "rlvhandler.h"
// [/RLVa:KB]
#if SHY_MOD //Command handler
#include "shcommandhandler.h"
#endif //shy_mod
//
// Globals
//
@@ -475,6 +479,9 @@ void LLChatBar::sendChat( EChatType type )
if (!utf8_revised_text.empty() && cmd_line_chat(utf8_revised_text, nType))
{
// Chat with animation
#if SHY_MOD //Command handler
if(!SHCommandHandler::handleCommand(true, utf8_revised_text, gAgentID, (LLViewerObject*)gAgent.getAvatarObject()))//returns true if handled
#endif //shy_mod
sendChatFromViewer(utf8_revised_text, nType, TRUE);
}
}

View File

@@ -185,7 +185,7 @@ void LLDrawPoolBump::prerender()
// static
S32 LLDrawPoolBump::numBumpPasses()
{
static LLCachedControl<bool> render_object_bump("RenderObjectBump",false);
static const LLCachedControl<bool> render_object_bump("RenderObjectBump",false);
if (render_object_bump)
{
if (mVertexShaderLevel > 1)

View File

@@ -209,7 +209,7 @@ void LLDrawPoolTerrain::render(S32 pass)
}
// Special-case for land ownership feedback
static LLCachedControl<bool> show_parcel_owners("ShowParcelOwners",false);
static const LLCachedControl<bool> show_parcel_owners("ShowParcelOwners",false);
if (show_parcel_owners)
{
if (mVertexShaderLevel > 1)

View File

@@ -44,7 +44,7 @@
#include "llagent.h"
#include "llcombobox.h"
#include "llnotify.h"
#include "llnotify.h"
#include "llviewerimagelist.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"

View File

@@ -700,22 +700,26 @@ void LLFloaterAvatarList::refreshAvatarList()
//Lindens are always more Linden than your friend, make that take precedence
if(LLMuteList::getInstance()->isLinden(av_name))
{
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentLindenColor").getValue();
static const LLCachedControl<LLColor4> ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_linden_color.get().getValue();
}
//check if they are an estate owner at their current position
else if(estate_owner.notNull() && av_id == estate_owner)
{
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentEstateOwnerColor").getValue();
static const LLCachedControl<LLColor4> ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f));
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_estate_owner_color.get().getValue();
}
//without these dots, SL would suck.
else if(is_agent_friend(av_id))
{
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentFriendColor").getValue();
static const LLCachedControl<LLColor4> ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_friend_color.get().getValue();
}
//big fat jerkface who is probably a jerk, display them as such.
else if(LLMuteList::getInstance()->isMuted(av_id))
{
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentMutedColor").getValue();
static const LLCachedControl<LLColor4> ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f));
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_muted_color.get().getValue();
}
@@ -807,15 +811,17 @@ void LLFloaterAvatarList::refreshAvatarList()
//element["columns"][LIST_METADATA]["column"] = "metadata";
//element["columns"][LIST_METADATA]["type"] = "text";
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
static const LLCachedControl<LLColor4> avatar_name_color("AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)), gColors );
static const LLCachedControl<LLColor4> unselected_color("ScrollUnselectedColor",LLColor4(LLColor4U(0, 0, 0, 204)), gColors );
LLColor4 name_color(avatar_name_color);
std::string client;
LLVOAvatar *avatarp = gObjectList.findAvatar(av_id);
if(avatarp)
{
avatarp->getClientInfo(client, avatar_name_color, TRUE);
avatarp->getClientInfo(client, name_color, TRUE);
if(client == "")
{
avatar_name_color = gColors.getColor( "ScrollUnselectedColor" );
name_color = unselected_color;
client = "?";
}
element["columns"][LIST_CLIENT]["value"] = client.c_str();
@@ -833,9 +839,9 @@ void LLFloaterAvatarList::refreshAvatarList()
element["columns"][LIST_CLIENT]["value"] = "Out Of Range";
}
//Blend to make the color show up better
avatar_name_color = avatar_name_color * 0.5f + gColors.getColor( "ScrollUnselectedColor" ) * 0.5f;
name_color = name_color *.5f + unselected_color * .5f;
element["columns"][LIST_CLIENT]["color"] = avatar_name_color.getValue();
element["columns"][LIST_CLIENT]["color"] = avatar_name_color.get().getValue();
// Add to list
mAvatarList->addElement(element, ADD_BOTTOM);

View File

@@ -105,7 +105,7 @@ void LLFloaterSettingsDebug::draw()
{
LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
updateControl(controlp);
updateControl(controlp ? controlp->getCOAActive() : NULL);
LLFloater::draw();
}
@@ -130,7 +130,7 @@ void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data)
LLComboBox* combo_box = (LLComboBox*)ctrl;
LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata();
floaterp->updateControl(controlp);
floaterp->updateControl(controlp ? controlp->getCOAActive() : NULL);
}
//static
@@ -140,6 +140,7 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
controlp = controlp ? controlp->getCOAActive() : NULL;
LLVector3 vector;
LLVector3d vectord;
@@ -217,6 +218,7 @@ void LLFloaterSettingsDebug::onClickDefault(void* user_data)
if (controlp)
{
controlp = controlp->getCOAActive();
controlp->resetToDefault();
floaterp->updateControl(controlp);
}
@@ -274,6 +276,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
}
// [/RLVa:KB]
controlp = controlp->getCOAActive();
eControlType type = controlp->type();
//hide combo box only for non booleans, otherwise this will result in the combo box closing every frame

View File

@@ -733,7 +733,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (freeze_time &&
(new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))
{
@@ -2160,7 +2160,7 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView()
BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
{
// use default handler when not in freeze-frame mode
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if(!freeze_time)
{
return LLFloaterView::handleKey(key, mask, called_from_parent);
@@ -2182,7 +2182,7 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren
BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
{
// use default handler when not in freeze-frame mode
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if(!freeze_time)
{
return LLFloaterView::handleMouseDown(x, y, mask);
@@ -2198,7 +2198,7 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
{
// use default handler when not in freeze-frame mode
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if(!freeze_time)
{
return LLFloaterView::handleMouseUp(x, y, mask);
@@ -2214,7 +2214,7 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask)
{
// use default handler when not in freeze-frame mode
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if(!freeze_time)
{
return LLFloaterView::handleHover(x, y, mask);

View File

@@ -2939,7 +2939,7 @@ const std::string LLFolderView::getFilterSubString(BOOL trim)
void LLFolderView::filter( LLInventoryFilter& filter )
{
LLFastTimer t2(LLFastTimer::FTM_FILTER);
static LLCachedControl<S32> filter_items_per_frame("FilterItemsPerFrame",500);
static const LLCachedControl<S32> filter_items_per_frame("FilterItemsPerFrame",500);
filter.setFilterCount(llclamp((S32)filter_items_per_frame, 1, 5000));
if (getCompletedFilterGeneration() < filter.getCurrentGeneration())
@@ -4395,7 +4395,7 @@ void LLFolderView::doIdle()
{
LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
static LLCachedControl<bool> debug_filters("DebugInventoryFilters",false);
static const LLCachedControl<bool> debug_filters("DebugInventoryFilters",false);
if (debug_filters != (bool)getDebugFilters())
{
mDebugFilters = debug_filters;

View File

@@ -60,6 +60,10 @@
#include "chatbar_as_cmdline.h"
#if SHY_MOD //Command handler
#include "shcommandhandler.h"
#endif //shy_mod
LLGestureManager gGestureManager;
// Longest time, in seconds, to wait for all animations to stop playing
@@ -874,6 +878,9 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step)
if ( cmd_line_chat(chat_text, CHAT_TYPE_NORMAL))
{
#if SHY_MOD //Command handler
if(!SHCommandHandler::handleCommand(true, chat_text, gAgentID, gAgent.getAvatarObject()))//returns true if handled
#endif //shy_mod
gChatBar->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate);
}
gesture->mCurrentStep++;

View File

@@ -629,6 +629,91 @@ bool packRoleUpdateMessageBlock(LLMessageSystem* msg,
return start_message;
}
#if SHY_MOD //Group Title script access
#include "shcommandhandler.h"
class SH_GroupRoleChanger
{
std::pair<LLUUID, std::string> gForceRole;
typedef std::map<const bool,std::string> title_map_t;
typedef std::map<std::string,title_map_t> role_map_t;
typedef std::map<const LLUUID,role_map_t> group_map_t;
//group_map_t = <GroupID,<Rolename,<Title/Desc,text>>>
group_map_t gPendingRoleChanges; //lol
public:
virtual ~SH_GroupRoleChanger(){}
void CheckUpdateRole(const LLUUID &group_id,LLGroupMgrGroupData::role_list_t &roles)
{
group_map_t::iterator group_it = gPendingRoleChanges.find(group_id);
if(group_it != gPendingRoleChanges.end()) //valid group
{
for(LLGroupMgrGroupData::role_list_t::iterator roles_it = roles.begin();roles_it!=roles.end();++roles_it)
{
//bool start_message = true;
LLGroupRoleData &role = *(roles_it->second);
LLRoleData data = role.getRoleData();
role_map_t::iterator stored_role_it = group_it->second.find(data.mRoleName);
if(stored_role_it != group_it->second.end())//found matching role.
{
if(!(stored_role_it->second.empty()))
{
title_map_t::iterator entry_it = stored_role_it->second.begin();
for(;entry_it!=stored_role_it->second.end();++entry_it)
{
if(entry_it->first == false)
data.mRoleDescription = entry_it->second;
else
data.mRoleTitle = entry_it->second;
}
if(gForceRole.first == group_id && gForceRole.second == data.mRoleName)
{
if(gAgent.getGroupID() != group_id)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ActivateGroup);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_GroupID, group_id);
gAgent.sendReliableMessage(); //Set group.
}
LLGroupMgr::getInstance()->sendGroupTitleUpdate(group_id,role.getID());
}
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id);
gdatap->setRoleData(role.getID(),data);
}
}
}
gPendingRoleChanges.erase(group_it);
}
LLGroupMgr::getInstance()->sendGroupRoleChanges(group_id); //get roles list from groupid
gForceRole.first = LLUUID::null;
}
void RequestUpdateRole(const LLUUID& group_id, const std::string &rolename, bool title, const std::string &string, bool force = false) //if !title then desc.
{
if(force)
{
gForceRole.first = group_id;
gForceRole.second = rolename;
}
gPendingRoleChanges[group_id][rolename][title]=string;
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(group_id); //get roles list from groupid
}
}gGroupRoleChanger;
CMD_SCRIPT(setroletext)
{
const LLUUID group_id = args[1].asUUID();
const std::string rolename = args[2].asString();
const bool title = args[3].asInteger() == 1;
const std::string str = args[4].asString();
const bool force = args[5].asInteger() == 1;
llinfos<<"Updating role- group_id:"<<group_id<<" rolename:"<<rolename<<" title:"<<title<<" string:"<<str<<llendl;
gGroupRoleChanger.RequestUpdateRole(group_id,rolename,title,str,force);
}
#endif //shy_mod
void LLGroupMgrGroupData::sendRoleChanges()
{
// Commit changes locally
@@ -1031,6 +1116,9 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
}
group_data->mChanged = TRUE;
#if SHY_MOD //Group title script access
gGroupRoleChanger.CheckUpdateRole(group_id,group_data->mRoles);
#endif //shy_mod
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_DATA);
}

View File

@@ -504,7 +504,7 @@ void LLHUDEffectLookAt::setSourceObject(LLViewerObject* objectp)
//-----------------------------------------------------------------------------
void LLHUDEffectLookAt::render()
{
static LLCachedControl<bool> private_look_at("PrivateLookAt",false);
static const LLCachedControl<bool> private_look_at("PrivateLookAt",false);
if (private_look_at &&
(gAgent.getAvatarObject() == ((LLVOAvatar*)(LLViewerObject*)mSourceObject))) return;
if (sDebugLookAt && mSourceObject.notNull())

View File

@@ -297,7 +297,6 @@ void LLHUDText::renderText(BOOL for_select)
// *TODO: make this a per-text setting
static LLCachedControl<LLColor4> background_chat_color("BackgroundChatColor", LLColor4(0,0,0,1.f));
//static LLColor4 background_chat_color(0,0,0,1.f);
static LLCachedControl<F32> chat_bubble_opacity("ChatBubbleOpacity", .5);
LLColor4 bg_color = background_chat_color;
bg_color.setAlpha(chat_bubble_opacity * alpha_factor);
@@ -1221,4 +1220,4 @@ void LLHUDText::refreshAllObjectText()
}
}
}
// [/RLVa:KB]
// [/RLVa:KB]

View File

@@ -124,7 +124,7 @@ void handle_inventory(void*)
void handle_chat(void*)
{
// give focus to chatbar if it's open but not focused
static LLCachedControl<bool> chat_visible("ChatVisible",true);
static const LLCachedControl<bool> chat_visible("ChatVisible",true);
if (chat_visible && gFocusMgr.childHasKeyboardFocus(gChatBar))
{
LLChatBar::stopChat();

View File

@@ -359,15 +359,15 @@ void LLNetMap::draw()
// Draw avatars
// LLColor4 mapcolor = gAvatarMapColor;
LLColor4 standard_color = gColors.getColor( "MapAvatar" );
//LLColor4 friend_color = gCOASavedSettings->getColor4("AscentFriendColor");
LLColor4 em_color = gCOASavedSettings->getColor4("AscentEstateOwnerColor");
LLColor4 linden_color = gCOASavedSettings->getColor4("AscentLindenColor");
LLColor4 muted_color = gCOASavedSettings->getColor4("AscentMutedColor");
static const LLCachedControl<LLColor4> standard_color("MapAvatar",LLColor4(0.f,1.f,0.f,1.f),gColors);
static const LLCachedControl<LLColor4> friend_color_stored("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
static const LLCachedControl<LLColor4> em_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f));
static const LLCachedControl<LLColor4> linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
static const LLCachedControl<LLColor4> muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f));
// Draw avatars
// [RLVa:KB] - Version: 1.23.4 | Alternate: Snowglobe-1.2.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
LLColor4 friend_color = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? gCOASavedSettings->getColor4("AscentFriendColor") : standard_color;
LLColor4 friend_color = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? friend_color_stored : standard_color;
// [/RLVa:KB]
std::vector<LLUUID> avatar_ids;
std::vector<LLVector3d> positions;

View File

@@ -378,7 +378,7 @@ void LLOverlayBar::refresh()
childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
// always let user toggle into and out of chatbar
static LLCachedControl<bool> chat_visible("ChatVisible",true);
static const LLCachedControl<bool> chat_visible("ChatVisible",true);
childSetVisible("chat_bar", chat_visible);
if (buttons_changed)

View File

@@ -79,14 +79,14 @@ void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, void* data)
//Begin Ascent SavedSettings/PerAccountSettings handling
//Get
LLControlVariable *gCOASavedSettings->getControl(const std::string &name)
LLControlVariable *LLSavedSettingsGlue::getControl(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getControl(name);
else
return gSavedPerAccountSettings.getControl(name);
}
BOOL gCOASavedSettings->getBOOL(const std::string &name)
BOOL LLSavedSettingsGlue::getBOOL(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getBOOL(name);
@@ -94,7 +94,7 @@ BOOL gCOASavedSettings->getBOOL(const std::string &name)
return gSavedPerAccountSettings.getBOOL(name);
}
S32 gCOASavedSettings->getS32(const std::string &name)
S32 LLSavedSettingsGlue::getS32(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getS32(name);
@@ -102,7 +102,7 @@ S32 gCOASavedSettings->getS32(const std::string &name)
return gSavedPerAccountSettings.getS32(name);
}
F32 gCOASavedSettings->getF32(const std::string &name)
F32 LLSavedSettingsGlue::getF32(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getF32(name);
@@ -110,7 +110,7 @@ F32 gCOASavedSettings->getF32(const std::string &name)
return gSavedPerAccountSettings.getF32(name);
}
U32 gCOASavedSettings->getU32(const std::string &name)
U32 LLSavedSettingsGlue::getU32(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getU32(name);
@@ -118,7 +118,7 @@ U32 gCOASavedSettings->getU32(const std::string &name)
return gSavedPerAccountSettings.getU32(name);
}
std::string gCOASavedSettings->getString(const std::string &name)
std::string LLSavedSettingsGlue::getString(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getString(name);
@@ -126,7 +126,7 @@ std::string gCOASavedSettings->getString(const std::string &name)
return gSavedPerAccountSettings.getString(name);
}
LLColor4 gCOASavedSettings->getColor4(const std::string &name)
LLColor4 LLSavedSettingsGlue::getColor4(const std::string &name)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
return gSavedSettings.getColor4(name);
@@ -136,7 +136,7 @@ LLColor4 gCOASavedSettings->getColor4(const std::string &name)
//Set
void gCOASavedSettings->setBOOL(const std::string &name, BOOL value)
void LLSavedSettingsGlue::setBOOL(const std::string &name, BOOL value)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
gSavedSettings.setBOOL(name, value);
@@ -144,7 +144,7 @@ void gCOASavedSettings->setBOOL(const std::string &name, BOOL value)
gSavedPerAccountSettings.setBOOL(name, value);
}
void gCOASavedSettings->setS32(const std::string &name, S32 value)
void LLSavedSettingsGlue::setS32(const std::string &name, S32 value)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
gSavedSettings.setS32(name, value);
@@ -152,7 +152,7 @@ void gCOASavedSettings->setS32(const std::string &name, S32 value)
gSavedPerAccountSettings.setS32(name, value);
}
void gCOASavedSettings->setF32(const std::string &name, F32 value)
void LLSavedSettingsGlue::setF32(const std::string &name, F32 value)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
gSavedSettings.setF32(name, value);
@@ -160,7 +160,7 @@ void gCOASavedSettings->setF32(const std::string &name, F32 value)
gSavedPerAccountSettings.setF32(name, value);
}
void gCOASavedSettings->setU32(const std::string &name, U32 value)
void LLSavedSettingsGlue::setU32(const std::string &name, U32 value)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
gSavedSettings.setU32(name, value);
@@ -168,7 +168,7 @@ void gCOASavedSettings->setU32(const std::string &name, U32 value)
gSavedPerAccountSettings.setU32(name, value);
}
void gCOASavedSettings->setString(const std::string &name, std::string value)
void LLSavedSettingsGlue::setString(const std::string &name, std::string value)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
gSavedSettings.setString(name, value);
@@ -176,7 +176,7 @@ void gCOASavedSettings->setString(const std::string &name, std::string value)
gSavedPerAccountSettings.setString(name, value);
}
void gCOASavedSettings->setColor4(const std::string &name, LLColor4 value)
void LLSavedSettingsGlue::setColor4(const std::string &name, LLColor4 value)
{
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
gSavedSettings.setColor4(name, value);

View File

@@ -41,8 +41,7 @@ class LLUICtrl;
// and assign the control name as a const char* to the userdata.
class LLSavedSettingsGlue
{
public:
/*
public:/*
static void setBOOL(LLUICtrl* ctrl, void* name);
static void setS32(LLUICtrl* ctrl, void* name);
static void setF32(LLUICtrl* ctrl, void* name);
@@ -50,7 +49,7 @@ public:
static void setString(LLUICtrl* ctrl, void* name);
//Ascent Client-Or-Account Settings Get
static LLControlVariable *gCOASavedSettings->getControl(const std::string &name);
static LLControlVariable *getControl(const std::string &name);
static BOOL getCOABOOL(const std::string &name);
static S32 getCOAS32(const std::string &name);
static F32 getCOAF32(const std::string &name);

View File

@@ -1302,7 +1302,7 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
{
static LLCachedControl<BOOL> render_water_void_culling("RenderWaterVoidCulling", TRUE);
static const LLCachedControl<BOOL> render_water_void_culling("RenderWaterVoidCulling", TRUE);
// Don't cull hole/edge water, unless RenderWaterVoidCulling is set and we have the GL_ARB_depth_clamp extension.
if ((mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_VOIDWATER &&
!(render_water_void_culling && gGLManager.mHasDepthClamp)) ||

View File

@@ -205,13 +205,6 @@
#include "scriptcounter.h"
// </edit>
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -221,14 +214,6 @@
#include "lldxhardware.h"
#endif
//
// exported globals
//

View File

@@ -109,7 +109,7 @@ void LLStatGraph::draw()
// gColors.getColor("ColorDropShadow"),
// (S32) gSavedSettings.getF32("DropShadowFloater") );
static LLCachedControl<LLColor4> menu_default_color("MenuDefaultBgColor",LLColor4(0,0,255),gColors);
static const LLCachedControl<LLColor4> menu_default_color("MenuDefaultBgColor",LLColor4(0.f,0.f,0.f,1.f),gColors);
color = menu_default_color;
gGL.color4fv(color.mV);
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE);

View File

@@ -239,8 +239,8 @@ void LLStatusBar::draw()
if (isBackgroundVisible())
{
static LLCachedControl<LLColor4> color_drop_shadow("ColorDropShadow",LLColor4(0,0,200),LLUI::sColorsGroup);
static LLCachedControl<S32> drop_shadow_floater("DropShadowFloater",5,LLUI::sConfigGroup);
static const LLCachedControl<LLColor4> color_drop_shadow("ColorDropShadow",LLColor4(LLColor4U(0,0,0,200)),LLUI::sColorsGroup);
static const LLCachedControl<S32> drop_shadow_floater("DropShadowFloater",5,LLUI::sConfigGroup);
gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
color_drop_shadow,
drop_shadow_floater );

View File

@@ -759,7 +759,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == LOAD_FROM_NETWORK)
{
static LLCachedControl<bool> image_pipeline_use_http("ImagePipelineUseHTTP",false);
static const LLCachedControl<bool> image_pipeline_use_http("ImagePipelineUseHTTP",false);
bool get_url = image_pipeline_use_http;
if (!mUrl.empty()) get_url = false;
// if (mHost != LLHost::invalid) get_url = false;
@@ -1729,7 +1729,7 @@ S32 LLTextureFetch::update(U32 max_time_ms)
{
S32 res;
static LLCachedControl<F32> throttle_bandwidth_kbps("ThrottleBandwidthKBPS",500);
static const LLCachedControl<F32> throttle_bandwidth_kbps("ThrottleBandwidthKBPS",500);
mMaxBandwidth = throttle_bandwidth_kbps;
res = LLWorkerThread::update(max_time_ms);

View File

@@ -216,7 +216,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
gAgent.setFocusGlobal(pick_info);
}
static LLCachedControl<bool> freeze_time("FreezeTime",0);
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
if (!(pick_info.mKeyMask & MASK_ALT) &&
gAgent.cameraThirdPerson() &&
gViewerWindow->getLeftMouseDown() &&

View File

@@ -239,7 +239,7 @@ bool LLToolMgr::inBuildMode()
// when entering mouselook inEdit() immediately returns true before
// cameraMouselook() actually starts returning true. Also, appearance edit
// sets build mode to true, so let's exclude that.
static LLCachedControl<bool> build_btn_state("BuildBtnState",false);
static const LLCachedControl<bool> build_btn_state("BuildBtnState",false);
bool b=(inEdit()
&& build_btn_state
&& !gAgent.cameraMouselook()

View File

@@ -114,24 +114,24 @@ void init_audio()
void audio_update_volume(bool force_update)
{
static LLCachedControl<F32> master_volume("AudioLevelMaster",1.0);
static LLCachedControl<F32> audio_level_sfx("AudioLevelSFX",1.0);
static LLCachedControl<F32> audio_level_ui("AudioLevelUI",1.0);
static LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1.0);
static LLCachedControl<F32> audio_level_music("AudioLevelMusic",1.0);
static LLCachedControl<F32> audio_level_media("AudioLevelMedia",1.0);
static LLCachedControl<F32> audio_level_voice("AudioLevelVoice",1.0);
static LLCachedControl<F32> audio_level_mic("AudioLevelMic",1.0);
static LLCachedControl<bool> _mute_audio("MuteAudio",false);
static LLCachedControl<bool> mute_sounds("MuteSounds",false);
static LLCachedControl<bool> mute_ui("MuteUI",false);
static LLCachedControl<bool> mute_ambient("MuteAmbient",false);
static LLCachedControl<bool> mute_music("MuteMusic",false);
static LLCachedControl<bool> mute_media("MuteMedia",false);
static LLCachedControl<bool> mute_voice("MuteVoice",false);
static LLCachedControl<bool> mute_when_minimized("MuteWhenMinimized",true);
static LLCachedControl<F32> audio_level_doppler("AudioLevelDoppler",1.0);
static LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1.0);
static const LLCachedControl<F32> master_volume("AudioLevelMaster",1.0);
static const LLCachedControl<F32> audio_level_sfx("AudioLevelSFX",1.0);
static const LLCachedControl<F32> audio_level_ui("AudioLevelUI",1.0);
static const LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1.0);
static const LLCachedControl<F32> audio_level_music("AudioLevelMusic",1.0);
static const LLCachedControl<F32> audio_level_media("AudioLevelMedia",1.0);
static const LLCachedControl<F32> audio_level_voice("AudioLevelVoice",1.0);
static const LLCachedControl<F32> audio_level_mic("AudioLevelMic",1.0);
static const LLCachedControl<bool> _mute_audio("MuteAudio",false);
static const LLCachedControl<bool> mute_sounds("MuteSounds",false);
static const LLCachedControl<bool> mute_ui("MuteUI",false);
static const LLCachedControl<bool> mute_ambient("MuteAmbient",false);
static const LLCachedControl<bool> mute_music("MuteMusic",false);
static const LLCachedControl<bool> mute_media("MuteMedia",false);
static const LLCachedControl<bool> mute_voice("MuteVoice",false);
static const LLCachedControl<bool> mute_when_minimized("MuteWhenMinimized",true);
static const LLCachedControl<F32> audio_level_doppler("AudioLevelDoppler",1.0);
static const LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1.0);
BOOL mute_audio = _mute_audio;
if (!gViewerWindow->getActive() && mute_when_minimized)
{
@@ -228,7 +228,7 @@ void audio_update_wind(bool force_update)
//
if (force_update || (last_camera_water_height * camera_water_height) < 0.f)
{
static LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1);
static const LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1);
if (camera_water_height < 0.f)
{
gAudiop->setRolloffFactor(audio_level_rolloff * LL_ROLLOFF_MULTIPLIER_UNDER_WATER);
@@ -246,10 +246,10 @@ void audio_update_wind(bool force_update)
// don't use the setter setMaxWindGain() because we don't
// want to screw up the fade-in on startup by setting actual source gain
// outside the fade-in.
static LLCachedControl<bool> mute_audio("MuteAudio",false);
static LLCachedControl<bool> mute_ambient("MuteAmbient",false);
static LLCachedControl<F32> audio_level_master("AudioLevelMaster",1);
static LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1);
static const LLCachedControl<bool> mute_audio("MuteAudio",false);
static const LLCachedControl<bool> mute_ambient("MuteAmbient",false);
static const LLCachedControl<F32> audio_level_master("AudioLevelMaster",1);
static const LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1);
F32 master_volume = mute_audio ? 0.f : mute_ambient;
F32 ambient_volume = mute_ambient ? 0.f : audio_level_ambient;

View File

@@ -82,7 +82,6 @@ BOOL gHackGodmode = FALSE;
std::map<std::string, LLControlGroup*> gSettings;
LLControlGroup gSavedSettings; // saved at end of session
LLControlGroup gSavedPerAccountSettings; // saved at end of session
LLControlGroup *gCOASavedSettings = &gSavedSettings; //Ascent Client-Or-Account
LLControlGroup gColors; // read-only
LLControlGroup gCrashSettings; // saved at end of session
@@ -499,11 +498,7 @@ bool handleCloudSettingsChanged(const LLSD& newvalue)
LLPipeline::toggleRenderTypeControl((void*)LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS);
return true;
}
bool handleAscentCOAChange(const LLSD& newvalue)
{
gCOASavedSettings = newvalue.asBoolean() ? &gSavedPerAccountSettings : &gSavedSettings;
return true;
}
bool handleAscentSelfTag(const LLSD& newvalue)
{
if(gAgent.getAvatarObject())
@@ -522,7 +517,6 @@ bool handleAscentGlobalTag(const LLSD& newvalue)
return true;
}
////////////////////////////////////////////////////////////////////////////
void settings_setup_listeners()
{
gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _1));
@@ -645,7 +639,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _1));
gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _1));
gSavedSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1));
gSavedPerAccountSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1));
gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
@@ -664,17 +657,12 @@ void settings_setup_listeners()
gSavedSettings.getControl("CloudsEnabled")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _1));
gSavedSettings.getControl("SkyUseClassicClouds")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _1));
gSavedSettings.getControl("AscentStoreSettingsPerAccount")->getSignal()->connect(boost::bind(&handleAscentCOAChange,_1));
gSavedSettings.getControl("AscentShowSelfTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentShowSelfTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentUseTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gCOASavedSettings->getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gCOASavedSettings->getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gCOASavedSettings->getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gCOASavedSettings->getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
gSavedSettings.getControl("AscentShowFriendsTag")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
gSavedSettings.getControl("AscentShowOthersTag")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
gSavedSettings.getControl("AscentShowOthersTagColor")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
gSavedSettings.getControl("AscentUseStatusColors")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
}

View File

@@ -54,9 +54,7 @@ extern std::map<std::string, LLControlGroup*> gSettings;
void create_graphics_group(LLControlGroup& group);
// saved at end of session
extern LLControlGroup gSavedSettings;
extern LLControlGroup *gCOASavedSettings;
extern LLControlGroup gSavedPerAccountSettings;
// gSavedSettings and gSavedPerAccountSettings moved to llcontrol.h
// Read-only
extern LLControlGroup gColors;
@@ -68,173 +66,15 @@ extern LLControlGroup gCrashSettings;
extern std::string gLastRunVersion;
extern std::string gCurrentVersion;
//! Helper function for LLCachedControl
template <class T>
eControlType get_control_type(const T& in, LLSD& out)
{
llerrs << "Usupported control type: " << typeid(T).name() << "." << llendl;
return TYPE_COUNT;
}
bool handleCloudSettingsChanged(const LLSD& newvalue);
//! Publish/Subscribe object to interact with LLControlGroups.
//NOTE: LLCachedControl moved to llxml/llcontrol.h make it easier to use in other projects.
//! An LLCachedControl instance to connect to a LLControlVariable
//! without have to manually create and bind a listener to a local
//! object.
template <class T>
class LLCachedControl
{
T mCachedValue;
LLPointer<LLControlVariable> mControl;
boost::signals::connection mConnection;
LLControlGroup *mControlGroup;
public:
LLCachedControl(const std::string& name, const T& default_value, LLControlGroup *group, const std::string& comment = "Declared In Code")
{Init(name,default_value,comment,*group);} //for gSavedPerAccountSettings, etc
LLCachedControl(const std::string& name, const T& default_value, LLControlGroup &group, const std::string& comment = "Declared In Code")
{Init(name,default_value,comment,group);} //for LLUI::sConfigGroup, etc
LLCachedControl(const std::string& name,
const T& default_value,
const std::string& comment = "Declared In Code",
LLControlGroup &group = gSavedSettings)
{Init(name,default_value,comment,group);} //for default (gSavedSettings)
private:
//Pulled out of ctor due to problems with initializer lists in template classes
void Init( const std::string& name,
const T& default_value,
const std::string& comment,
LLControlGroup &group )
{
mControlGroup = &group;
mControl = mControlGroup->getControl(name);
if(mControl.isNull())
{
declareTypedControl(*mControlGroup, name, default_value, comment);
mControl = mControlGroup->getControl(name);
if(mControl.isNull())
{
llerrs << "The control could not be created!!!" << llendl;
}
mCachedValue = default_value;
}
else
{
mCachedValue = (const T&)mControl->getValue();
}
// Add a listener to the controls signal...
// and store the connection...
mConnection = mControl->getSignal()->connect(
boost::bind(&LLCachedControl<T>::handleValueChange, this, _1)
);
}
public:
~LLCachedControl()
{
if(mConnection.connected())
{
mConnection.disconnect();
}
}
LLCachedControl& operator =(const T& newvalue)
{
setTypeValue(*mControl, newvalue);
return *this;
}
operator const T&() { return mCachedValue; }
const LLControlVariable * getControl() {
return mControl;
}
private:
void declareTypedControl(LLControlGroup& group,
const std::string& name,
const T& default_value,
const std::string& comment)
{
LLSD init_value;
eControlType type = get_control_type<T>(default_value, init_value);
if(type < TYPE_COUNT)
{
group.declareControl(name, type, init_value, comment, FALSE);
}
}
bool handleValueChange(const LLSD& newvalue)
{
mCachedValue = (const T &)newvalue;
return true;
}
void setTypeValue(LLControlVariable& c, const T& v)
{
// Implicit conversion from T to LLSD...
c.set(v);
}
};
//Easiest way without messing with LLCachedControl even more..
template <class T>
class LLCachedCOAControl
{
LLCachedControl<T> *mCachedControl;
boost::signals::connection mCOAConnection;
const std::string mName;
const std::string mComment;
const T mDefault;
public:
LLCachedCOAControl(const std::string& name, const T& default_value,const std::string& comment = "Declared In Code")
: mName(name),mDefault(default_value),mComment(comment)
{
mCachedControl = new LLCachedControl<T>(mName,mDefault,gCOASavedSettings,mComment);
static LLCachedControl<bool> settings_per_account("AscentStoreSettingsPerAccount",false);
mCOAConnection = settings_per_account.getControl()->getSignal()->connect(
boost::bind(&LLCachedCOAControl<T>::handleCOAValueChange, this, _1));
}
~LLCachedCOAControl()
{
if(mCachedControl)
delete mCOAConnection;
if(mCOAConnection.connected())
mCOAConnection.disconnect();
}
bool handleCOAValueChange(const LLSD& newvalue)
{
if(mCachedControl)
delete mCachedControl;
mCachedControl = new LLCachedControl<T>(mName,mDefault,gCOASavedSettings,mComment);
return true;
}
operator const T&() { return *mCachedControl; }
};
template <> eControlType get_control_type<U32>(const U32& in, LLSD& out);
template <> eControlType get_control_type<S32>(const S32& in, LLSD& out);
template <> eControlType get_control_type<F32>(const F32& in, LLSD& out);
template <> eControlType get_control_type<bool> (const bool& in, LLSD& out);
// Yay BOOL, its really an S32.
//template <> eControlType get_control_type<BOOL> (const BOOL& in, LLSD& out)
template <> eControlType get_control_type<std::string>(const std::string& in, LLSD& out);
template <> eControlType get_control_type<LLVector3>(const LLVector3& in, LLSD& out);
template <> eControlType get_control_type<LLVector3d>(const LLVector3d& in, LLSD& out);
template <> eControlType get_control_type<LLRect>(const LLRect& in, LLSD& out);
template <> eControlType get_control_type<LLColor4>(const LLColor4& in, LLSD& out);
template <> eControlType get_control_type<LLColor3>(const LLColor3& in, LLSD& out);
template <> eControlType get_control_type<LLColor4U>(const LLColor4U& in, LLSD& out);
template <> eControlType get_control_type<LLSD>(const LLSD& in, LLSD& out);
//A template would be a little awkward to use here.. so.. a preprocessor macro. Alas. onCommitControlSetting(gSavedSettings) etc.
inline void onCommitControlSetting_gSavedSettings(LLUICtrl* ctrl, void* name) {gSavedSettings.setValue((const char*)name,ctrl->getValue());}
inline void onCommitControlSetting_gSavedPerAccountSettings(LLUICtrl* ctrl, void* name) {gSavedPerAccountSettings.setValue((const char*)name,ctrl->getValue());}
inline void onCommitControlSetting_gCOASavedSettings(LLUICtrl* ctrl, void* name) {gCOASavedSettings->setValue((const char*)name,ctrl->getValue());}
#define onCommitControlSetting(controlgroup) onCommitControlSetting_##controlgroup
//#define TEST_CACHED_CONTROL 1

View File

@@ -167,7 +167,11 @@ void display_startup()
glClear(GL_DEPTH_BUFFER_BIT);
}
#if SHY_MOD //screenshot improvement
void display_update_camera(bool tiling=false)
#else //shy_mod
void display_update_camera()
#endif //ignore
{
llpushcallstacks ;
// TODO: cut draw distance down if customizing avatar?
@@ -176,6 +180,15 @@ void display_update_camera()
// Cut draw distance in half when customizing avatar,
// but on the viewer only.
F32 final_far = gAgent.mDrawDistance;
#if SHY_MOD //screenshot improvement
if(tiling) //Don't animate clouds and water if tiling!
{
LLViewerCamera::getInstance()->setFar(final_far);
gViewerWindow->setup3DRender();
LLWorld::getInstance()->setLandFarClip(final_far);
return;
}
#endif //shy_mod
if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode())
{
final_far *= 0.5f;
@@ -220,7 +233,11 @@ void display_stats()
}
// Paint the display!
#if SHY_MOD // screenshot improvement
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, BOOL tiling)
#else //shy_mod
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
#endif //ignore
{
LLFastTimer t(LLFastTimer::FTM_RENDER);
@@ -581,7 +598,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLGLNamePool::upkeepPools();
stop_glerror();
#if SHY_MOD //screenshot improvement
display_update_camera(tiling);
#else //shy_mod
display_update_camera();
#endif //ignore
stop_glerror();
// *TODO: merge these two methods
@@ -711,7 +732,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
#if SHY_MOD // screenshot improvement
if (!for_snapshot || tiling)
#else //shy_mod
if (!for_snapshot)
#endif //ignore
{
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());

View File

@@ -38,7 +38,11 @@ class LLPostProcess;
void display_startup();
void display_cleanup();
#if SHY_MOD // screenshot improvement
void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE, BOOL tiling = FALSE);
#else //shy_mod
void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE);
#endif //ignore
extern BOOL gDisplaySwapBuffers;
extern BOOL gDepthDirty;

View File

@@ -50,6 +50,10 @@
#include "chatbar_as_cmdline.h"
#if SHY_MOD //Command handler
#include "shcommandhandler.h"
#endif //shy_mod
// Globals
LLViewerGestureList gGestureList;
@@ -134,8 +138,11 @@ void LLViewerGesture::doTrigger( BOOL send_chat )
}
}
cmd_line_chat(mOutputString, CHAT_TYPE_NORMAL);
if ( send_chat && !mOutputString.empty())
bool handled = !cmd_line_chat(mOutputString, CHAT_TYPE_NORMAL);
#if SHY_MOD //Command handler
handled = handled || SHCommandHandler::handleCommand(true, mOutputString, gAgentID, gAgent.getAvatarObject());
#endif //shy_mod
if (!handled && send_chat && !mOutputString.empty())
{
// Don't play nodding animation, since that might not blend
// with the gesture animation.

View File

@@ -567,8 +567,14 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
if (gSavedSettings.getBOOL("HighResSnapshot"))
{
#if SHY_MOD // screenshot improvement
const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale");
width *= mult;
height *= mult;
#else //shy_mod
width *= 2;
height *= 2;
#endif //ignore
}
if (gViewerWindow->rawSnapshot(raw,

View File

@@ -147,6 +147,10 @@
#include "rlvhandler.h"
// [/RLVa:KB]
#if SHY_MOD //Group Title script access
# include "shcommandhandler.h"
#endif //shy_mod
#include <boost/tokenizer.hpp>
#if LL_WINDOWS // For Windows specific error handler
@@ -3036,7 +3040,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
if (!is_muted && !is_busy)
{
static LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
visible_in_chat_bubble = use_chat_bubbles;
((LLVOAvatar*)chatter)->addChat(chat);
}
@@ -3142,6 +3146,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
// [/RLVa:KB]
case CHAT_TYPE_DEBUG_MSG:
#if SHY_MOD //Command handler
if(SHCommandHandler::handleCommand(false,mesg,from_id,chatter))
return;
#endif //shy_mod
case CHAT_TYPE_NORMAL:
verb = ": ";
break;
@@ -3199,6 +3207,21 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
check_translate_chat(mesg, chat, TRUE);
}
}
// Make swirly things only for talking objects. (not script debug messages, though)
if( chatter
&& chat.mSourceType == CHAT_SOURCE_OBJECT
&& chat.mChatType != CHAT_TYPE_DEBUG_MSG
&& gSavedSettings.getBOOL("EffectScriptChatParticles") )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
psc->setColor(color);
//We set the particles to be owned by the object's owner,
//just in case they should be muted by the mute list
psc->setOwnerUUID(owner_id);
LLViewerPartSim::getInstance()->addPartSource(psc);
}
}

View File

@@ -728,7 +728,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
}
static LLCachedControl<bool> freeze_time("FreezeTime",0);
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
if (freeze_time)
{
for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();

View File

@@ -522,7 +522,7 @@ public:
ypos += y_inc;
}
// only display these messages if we are actually rendering beacons at this moment
static LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
if (LLPipeline::getRenderBeacons(NULL) && beacon_always_on)
{
if (LLPipeline::getRenderParticleBeacons(NULL))
@@ -2289,7 +2289,7 @@ void LLViewerWindow::draw()
//S32 screen_x, screen_y;
// HACK for timecode debugging
static LLCachedControl<bool> display_timecode("DisplayTimecode",false);
static const LLCachedControl<bool> display_timecode("DisplayTimecode",false);
if (display_timecode)
{
// draw timecode block
@@ -2767,7 +2767,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
LLVector2 mouse_vel;
static LLCachedControl<bool> mouse_smooth("MouseSmooth",false);
static const LLCachedControl<bool> mouse_smooth("MouseSmooth",false);
if (mouse_smooth)
{
static F32 fdx = 0.f;
@@ -2923,13 +2923,13 @@ BOOL LLViewerWindow::handlePerFrameHover()
// Show a new tool tip (or update one that is alrady shown)
BOOL tool_tip_handled = FALSE;
std::string tool_tip_msg;
static LLCachedControl<F32> tool_tip_delay("ToolTipDelay",.7f);
static const LLCachedControl<F32> tool_tip_delay("ToolTipDelay",.7f);
F32 tooltip_delay = tool_tip_delay;
//HACK: hack for tool-based tooltips which need to pop up more quickly
//Also for show xui names as tooltips debug mode
if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames)
{
static LLCachedControl<F32> drag_and_drop_tool_tip_delay("DragAndDropToolTipDelay",.1f);
static const LLCachedControl<F32> drag_and_drop_tool_tip_delay("DragAndDropToolTipDelay",.1f);
tooltip_delay = drag_and_drop_tool_tip_delay;
}
if( handled &&
@@ -2978,7 +2978,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
}
}
static LLCachedControl<bool> freeze_time("FreezeTime",0);
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !freeze_time)
{
LLMouseHandler *captor = gFocusMgr.getMouseCapture();
@@ -3120,7 +3120,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
gFloaterView->syncFloaterTabOrder();
}
static LLCachedControl<bool> chat_bar_steals_focus("ChatBarStealsFocus",true);
static const LLCachedControl<bool> chat_bar_steals_focus("ChatBarStealsFocus",true);
if (chat_bar_steals_focus
&& gChatBar
&& gFocusMgr.getKeyboardFocus() == NULL
@@ -3160,8 +3160,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
if ((previous_x != x) || (previous_y != y))
mouse_moved_since_pick = TRUE;
static LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
static LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
static const LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
static const LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
if( !getCursorHidden()
// When in-world media is in focus, pick every frame so that browser mouse-overs, dragging scrollbars, etc. work properly.
&& (LLViewerMediaFocus::getInstance()->getFocus()
@@ -4286,6 +4286,20 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
LLRenderTarget target;
F32 scale_factor = 1.0f ;
#if SHY_MOD // screenshot improvement
F32 internal_scale = 1.f;
static const LLCachedControl<bool> force_tile("SHHighResSnapshotForceTile",false);
if(force_tile)
{
static const LLCachedControl<F32> super_sample_scale("SHHighResSnapshotSuperSample",1.f);
internal_scale = llmax(super_sample_scale.get(),1.f);
}
// render at specified internal resolution. >1 results in supersampling.
image_height *= internal_scale;
image_width *= internal_scale;
#endif //shy_mod
if(!keep_window_aspect) //image cropping
{
F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
@@ -4297,6 +4311,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
{
if(image_width > window_width || image_height > window_height) //need to enlarge the scene
{
#if SHY_MOD // screenshot improvement
if(!force_tile)
#endif //shy_mod
if (gGLManager.mHasFramebufferObject && !show_ui)
{
GLint max_size = 0;
@@ -4333,6 +4350,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
S32 image_buffer_x = llfloor(snapshot_width*scale_factor) ;
S32 image_buffer_y = llfloor(snapshot_height *scale_factor) ;
#if SHY_MOD // screenshot improvement
if(internal_scale > 1.f) //If supersampling... Don't care about max_size.
#endif //shy_mod
if(image_buffer_x > max_size || image_buffer_y > max_size) //boundary check to avoid memory overflow
{
scale_factor *= llmin((F32)max_size / image_buffer_x, (F32)max_size / image_buffer_y) ;
@@ -4386,11 +4406,32 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
else
{
const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor));
#if SHY_MOD // screenshot improvement
//tiling requires gPipeline.generateWaterReflection to be called in display(). CANNOT be done if using an fbo.
display(do_rebuild, scale_factor, subfield, TRUE, !use_fbo && (scale_factor > 1.0f));
#else //shy_mod
display(do_rebuild, scale_factor, subfield, TRUE);
#endif
// Required for showing the GUI in snapshots? See DEV-16350 for details. JC
render_ui(scale_factor, subfield);
}
#if SHY_MOD // screenshot improvement
if(scale_factor <= 1.f) //faster. bulk copy opposed to line per line
{
if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR)
{
glReadPixels(0,0,image_width, image_height,GL_RGB, GL_UNSIGNED_BYTE,raw->getData());
}
else // SNAPSHOT_TYPE_DEPTH
{
LLPointer<LLImageRaw> depth_line_buffer = new LLImageRaw(image_width, image_height, sizeof(GL_FLOAT));
glReadPixels(0, 0,image_width,image_height, GL_DEPTH_COMPONENT, GL_FLOAT,depth_line_buffer->getData());
raw->copy(depth_line_buffer);
}
continue;
}
#endif //shy_mod
S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width);
// handle fractional rows
U32 read_width = llmax(0, (window_width - subimage_x_offset) -
@@ -4491,6 +4532,14 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
ret = raw->scale( image_width, image_height, FALSE );
}
#if SHY_MOD // screenshot improvement
if(raw->isBufferInvalid()) //Just checking!
return FALSE;
if(internal_scale != 1.f) //Scale down our render to the desired dimensions.
raw->scale( image_width/internal_scale, image_height/internal_scale );
if(raw->isBufferInvalid()) //Just checking!
return FALSE;
#endif //shy_mod
setCursor(UI_CURSOR_ARROW);
@@ -5128,7 +5177,7 @@ LLRect LLViewerWindow::getChatConsoleRect()
console_rect.mLeft += CONSOLE_PADDING_LEFT;
static LLCachedControl<bool> chat_full_width("ChatFullWidth",true);
static const LLCachedControl<bool> chat_full_width("ChatFullWidth",true);
if (chat_full_width)
{
console_rect.mRight -= CONSOLE_PADDING_RIGHT;

View File

@@ -762,6 +762,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mNameMute(FALSE),
mRenderGroupTitles(sRenderGroupTitles),
mNameAppearance(FALSE),
mRenderTag(FALSE),
mLastRegionHandle(0),
mRegionCrossingCount(0),
mFirstTEMessageReceived( FALSE ),
@@ -3332,22 +3333,24 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
if (!getTE(TEX_HEAD_BODYPAINT))
return;
std::string uuid_str = getTE(TEX_HEAD_BODYPAINT)->getID().asString(); //UUID of the head texture
static const LLCachedControl<LLColor4> avatar_name_color("AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)), gColors );
if (mIsSelf)
{
BOOL showCustomTag = gCOASavedSettings->getBOOL("AscentUseCustomTag");
if (!gSavedSettings.getBOOL("AscentShowSelfTagColor"))
static const LLCachedControl<bool> ascent_use_custom_tag("AscentUseCustomTag", false);
static const LLCachedControl<LLColor4> ascent_custom_tag_color("AscentCustomTagColor", LLColor4(.5f,1.f,.25f,1.f));
static const LLCachedControl<std::string> ascent_custom_tag_label("AscentCustomTagLabel","custom");
static const LLCachedControl<bool> ascent_use_tag("AscentUseTag",true);
static const LLCachedControl<std::string> ascent_report_client_uuid("AscentReportClientUUID","8873757c-092a-98fb-1afd-ecd347566fcd");
if (ascent_use_custom_tag)
{
color = gColors.getColor( "AvatarNameColor" );
color = ascent_custom_tag_color;
client = ascent_custom_tag_label;
return;
}
else if (showCustomTag)
{
color = gCOASavedSettings->getColor4("AscentCustomTagColor");
client = gCOASavedSettings->getString("AscentCustomTagLabel");
return;
}
else if (gSavedSettings.getBOOL("AscentUseTag"))
uuid_str = gCOASavedSettings->getString("AscentReportClientUUID");
else if (ascent_use_tag)
uuid_str = ascent_report_client_uuid;
}
if(getTEImage(TEX_HEAD_BODYPAINT)->getID() == IMG_DEFAULT_AVATAR)
{
@@ -3387,7 +3390,7 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
&& getTEImage(TEX_UPPER_BODYPAINT)->getID().asString() == "4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6"
&& getTEImage(TEX_LOWER_BODYPAINT)->getID().asString() == "4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6")
{
color = gColors.getColor( "AvatarNameColor" );
color = avatar_name_color;
client = "?";
}
return;
@@ -3421,17 +3424,12 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
}
else
{
color = gColors.getColor( "AvatarNameColor" );
color = avatar_name_color;
color.setAlpha(1.f);
client = "?";
//llinfos << "Apparently this tag isn't registered: " << uuid_str << llendl;
}
if ((mIsSelf)&&(!gSavedSettings.getBOOL("AscentShowSelfTagColor")))
{
color = gColors.getColor( "AvatarNameColor" );
}
if (false)
//We'll remove this entirely eventually, but it's useful information if we're going to try for the new client tag idea. -HgB
//if(useComment)
@@ -3628,22 +3626,22 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
//Lindens are always more Linden than your friend, make that take precedence
if(LLMuteList::getInstance()->isLinden(getFullname()))
{
mClientColor = gCOASavedSettings->getColor4("AscentLindenColor").getValue();
mClientColor = gSavedSettings.getColor4("AscentLindenColor").getValue();
}
//check if they are an estate owner at their current position
else if(estate_owner.notNull() && this->getID() == estate_owner)
{
mClientColor = gCOASavedSettings->getColor4("AscentEstateOwnerColor").getValue();
mClientColor = gSavedSettings.getColor4("AscentEstateOwnerColor").getValue();
}
//without these dots, SL would suck.
else if (LLAvatarTracker::instance().getBuddyInfo(this->getID()) != NULL)
{
mClientColor = gCOASavedSettings->getColor4("AscentFriendColor");
mClientColor = gSavedSettings.getColor4("AscentFriendColor");
}
//big fat jerkface who is probably a jerk, display them as such.
else if(LLMuteList::getInstance()->isMuted(this->getID()))
{
mClientColor = gCOASavedSettings->getColor4("AscentMutedColor").getValue();
mClientColor = gSavedSettings.getColor4("AscentMutedColor").getValue();
}
}
@@ -3923,7 +3921,6 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
}
void LLVOAvatar::idleUpdateTractorBeam()
{
//--------------------------------------------------------------------
@@ -3958,26 +3955,6 @@ void LLVOAvatar::idleUpdateTractorBeam()
{
mBeam = NULL;
}
else if (!mBeam || mBeam->isDead())
{
// VEFFECT: Tractor Beam
@@ -4034,87 +4011,6 @@ void LLVOAvatar::idleUpdateTractorBeam()
}
}
void LLVOAvatar::idleUpdateBelowWater()
{
F32 avatar_height = (F32)(getPositionGlobal().mdV[VZ]);

View File

@@ -719,6 +719,7 @@ private:
BOOL mNameBusy;
BOOL mNameMute;
BOOL mNameAppearance;
BOOL mRenderTag;
BOOL mVisibleChat;
BOOL mRenderGroupTitles;

View File

@@ -5867,8 +5867,8 @@ void LLVoiceClient::setVoiceEnabled(bool enabled)
bool LLVoiceClient::voiceEnabled()
{
static LLCachedControl<bool> enable_voice_chat("EnableVoiceChat",false);
static LLCachedControl<bool> cmd_line_disable_voice("CmdLineDisableVoice",false);
static const LLCachedControl<bool> enable_voice_chat("EnableVoiceChat",false);
static const LLCachedControl<bool> cmd_line_disable_voice("CmdLineDisableVoice",false);
return enable_voice_chat && !cmd_line_disable_voice;
}

View File

@@ -1023,7 +1023,7 @@ void LLVOSky::calcAtmospherics(void)
// Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio
// between sunlight and point lights in windlight to normalize point lights.
static LLCachedControl<F32> render_sun_dynamic_range("RenderSunDynamicRange", 1);
static const LLCachedControl<F32> render_sun_dynamic_range("RenderSunDynamicRange", 1);
F32 sun_dynamic_range = llmax((float)render_sun_dynamic_range, 0.0001f);
LLWLParamManager::instance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp);

View File

@@ -2234,8 +2234,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
std::vector<LLFace*> alpha_faces;
U32 useage = group->mSpatialPartition->mBufferUsage;
static LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
static LLCachedControl<S32> render_max_node_size("RenderMaxNodeSize",8192);
static const LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
static const LLCachedControl<S32> render_max_node_size("RenderMaxNodeSize",8192);
U32 max_vertices = (render_max_vbo_size*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
U32 max_total = (render_max_node_size*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);
@@ -2517,7 +2517,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort)
{
//calculate maximum number of vertices to store in a single buffer
static LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
static const LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
U32 max_vertices = (render_max_vbo_size*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);

View File

@@ -655,8 +655,8 @@ void LLWorld::updateParticles()
void LLWorld::updateClouds(const F32 dt)
{
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static LLCachedControl<bool> sky_use_classic_clouds("SkyUseClassicClouds",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> sky_use_classic_clouds("SkyUseClassicClouds",false);
if (freeze_time ||
!sky_use_classic_clouds)
{

View File

@@ -225,7 +225,11 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
return ret;
}
#if SHY_MOD //screenshot improvement
void display_update_camera(bool tiling=false);
#else //shy_mod
void display_update_camera();
#endif //ignore
//----------------------------------------
S32 LLPipeline::sCompiles = 0;
@@ -1024,7 +1028,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
return 0;
}
static LLCachedControl<bool> render_delay_creation("RenderDelayCreation",false);
static const LLCachedControl<bool> render_delay_creation("RenderDelayCreation",false);
if (render_delay_creation)
{
mCreateQ.push_back(vobj);
@@ -1088,7 +1092,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
static LLCachedControl<bool> render_animate_res("RenderAnimateRes",false);
static const LLCachedControl<bool> render_animate_res("RenderAnimateRes",false);
if (drawablep->getVOVolume() && render_animate_res)
{
// fun animated res
@@ -1128,7 +1132,7 @@ void LLPipeline::resetFrameStats()
//external functions for asynchronous updating
void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
{
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (freeze_time)
{
return;
@@ -1159,7 +1163,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
{
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (freeze_time)
{
return;
@@ -1213,7 +1217,7 @@ void LLPipeline::updateMove()
LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE);
LLMemType mt(LLMemType::MTYPE_PIPELINE);
static LLCachedControl<bool> freeze_time("FreezeTime",false);
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (freeze_time)
{
return;
@@ -2310,7 +2314,7 @@ void LLPipeline::postSort(LLCamera& camera)
}
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
static LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
if (beacon_always_on && !sShadowRender)
{
if (sRenderScriptedTouchBeacons)
@@ -5431,18 +5435,27 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index)
}
shader.uniform4fv("shadow_clip", 1, mSunClipPlanes.mV);
shader.uniform1f("sun_wash", gSavedSettings.getF32("RenderDeferredSunWash"));
shader.uniform1f("shadow_noise", gSavedSettings.getF32("RenderShadowNoise"));
shader.uniform1f("blur_size", gSavedSettings.getF32("RenderShadowBlurSize"));
static const LLCachedControl<F32> render_deferred_sun_wash("RenderDeferredSunWash",.5f);
static const LLCachedControl<F32> render_shadow_noise("RenderShadowNoise",-.0001f);
static const LLCachedControl<F32> render_shadow_blur_size("RenderShadowBlurSize",.7f);
static const LLCachedControl<F32> render_ssao_scale("RenderSSAOScale",500);
static const LLCachedControl<S32> render_ssao_max_scale("RenderSSAOMaxScale",60);
static const LLCachedControl<F32> render_ssao_factor("RenderSSAOFactor",.3f);
static const LLCachedControl<LLVector3> render_ssao_effect("RenderSSAOEffect",LLVector3(.4f,1,0));
static const LLCachedControl<F32> render_deferred_alpha_soft("RenderDeferredAlphaSoften",.75f);
shader.uniform1f("ssao_radius", gSavedSettings.getF32("RenderSSAOScale"));
shader.uniform1f("ssao_max_radius", gSavedSettings.getU32("RenderSSAOMaxScale"));
shader.uniform1f("sun_wash", render_deferred_sun_wash);
shader.uniform1f("shadow_noise", render_shadow_noise);
shader.uniform1f("blur_size", render_shadow_blur_size);
F32 ssao_factor = gSavedSettings.getF32("RenderSSAOFactor");
shader.uniform1f("ssao_radius", render_ssao_scale);
shader.uniform1f("ssao_max_radius", render_ssao_max_scale);
F32 ssao_factor = render_ssao_factor;
shader.uniform1f("ssao_factor", ssao_factor);
shader.uniform1f("ssao_factor_inv", 1.0/ssao_factor);
LLVector3 ssao_effect = gSavedSettings.getVector3("RenderSSAOEffect");
LLVector3 ssao_effect = render_ssao_effect;
F32 matrix_diag = (ssao_effect[0] + 2.0*ssao_effect[1])/3.0;
F32 matrix_nondiag = (ssao_effect[0] - ssao_effect[1])/3.0;
// This matrix scales (proj of color onto <1/rt(3),1/rt(3),1/rt(3)>) by
@@ -5454,7 +5467,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index)
shader.uniform2f("screen_res", mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
shader.uniform1f("near_clip", LLViewerCamera::getInstance()->getNear()*2.f);
shader.uniform1f("alpha_soften", gSavedSettings.getF32("RenderDeferredAlphaSoften"));
shader.uniform1f("alpha_soften", render_deferred_alpha_soft);
}
void LLPipeline::renderDeferredLighting()

View File

@@ -0,0 +1,178 @@
#include "llviewerprecompiledheaders.h"
#if SHY_MOD //Command handler
#include "lluuid.h"
#include "llagent.h"
#include "llviewerobjectlist.h"
#include "llviewerwindow.h"
#include "llhudtext.h"
#include <boost/tokenizer.hpp>
#include <ctype.h>
#include "shcommandhandler.h"
inline std::list<SHCommandHandler*> &SHCommandHandler::getScriptCommandList()
{
static std::list<SHCommandHandler*> sScriptCommandList;
return sScriptCommandList;
}
inline std::list<SHCommandHandler*> &SHCommandHandler::getChatCommandList()
{
static std::list<SHCommandHandler*> sChatCommandList;
return sChatCommandList;
}
SHCommandHandler::SHCommandHandler(bool from_chat, command_fn_t callback) : mDispatchFn(callback)
{
if(from_chat)
SHCommandHandler::getChatCommandList().push_back(this);
else
SHCommandHandler::getScriptCommandList().push_back(this);
}
bool SHCommandHandler::handleCommand(bool from_chat, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller)
{
static const LLCachedControl<bool> sh_allow_script_commands("SHAllowScriptCommands",true); //Are script commands enabled?
static const LLCachedControl<bool> sh_allow_chat_commands("AscentCmdLine",true); //Are chat commands enabled?
static const LLCachedControl<std::string> sh_script_cmd_prefix("SHScriptCommandPrefix","#@#@!");//Incomming script commands are prefixed with this string.
static const LLCachedControl<std::string> sh_chat_cmd_prefix("SHChatCommandPrefix",">>"); //Outgoing chat commands are prefixed with this string.
static const LLCachedControl<std::string> sh_script_cmd_sep("SHScriptCommandSeparator","|"); //Separator for script commands
static const LLCachedControl<std::string> sh_chat_cmd_sep("SHChatCommandSeparator"," "); //Separator for chat commands
const char *szPrefix = from_chat ? sh_chat_cmd_prefix.get().c_str() : sh_script_cmd_prefix.get().c_str();
const size_t prefix_len = strlen(szPrefix);
if(full_str.length() <= prefix_len || (prefix_len && full_str.substr(0,prefix_len)!=szPrefix))
return false; //Not a command
else if(!isalnum(full_str.c_str()[prefix_len]))
return false; //Commands must start with a # or letter
else if((!from_chat && !sh_allow_script_commands) || (from_chat && !sh_allow_chat_commands))
return !!prefix_len; //These commands are disabled.
const std::string trimmed_str = full_str.substr(prefix_len,std::string::npos);
typedef boost::char_separator<char> sep_t;
const sep_t sep(from_chat ? sh_chat_cmd_sep.get().c_str(): sh_script_cmd_sep.get().c_str(),"", boost::keep_empty_tokens);
const boost::tokenizer<sep_t> tokens(trimmed_str, sep);
const boost::tokenizer<sep_t>::const_iterator tok_end = tokens.end();
boost::tokenizer<sep_t>::const_iterator tok_iter = tokens.begin();
if(tok_iter == tok_end) //Shouldn't ever be true.
return !from_chat && !!prefix_len; //Don't spam if the prefix was correct yet the string was empty.
LLSD cmd_args; //Push tokens into LLSD so args can be looked up via args[#]
bool found = false; //Return this if found. Also used to determine if cmd_args has been set up.
//Now look for the command.
std::list<SHCommandHandler*> &CommandList = from_chat ? getChatCommandList() : getScriptCommandList();
std::list<SHCommandHandler*>::iterator cmd_iter = CommandList.begin();
const std::list<SHCommandHandler*>::iterator cmd_end = CommandList.end();
const std::string search_arg = utf8str_tolower(*tok_iter);
for(cmd_iter;cmd_iter!=cmd_end;++cmd_iter)
{
if(search_arg==utf8str_tolower((*cmd_iter)->getName()))
{
if(!found)
{
found = true;
int i = -1;
for(tok_iter;tok_iter!=tok_end;++tok_iter) //Fill the LLSD
cmd_args[++i] = (*tok_iter);
}
(*cmd_iter)->Dispatch(cmd_args,trimmed_str,callerid,pCaller);
}
}
return found || !!prefix_len; //Don't spam if the prefix was correct yet the command wasn't found.
}
void SHCommandHandler::send_chat_to_object(const std::string &message, int channel, const LLUUID &target_id/*=gAgentID*/)
{
if(target_id.isNull())return;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ScriptDialogReply");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("ObjectID", target_id);
msg->addS32("ChatChannel", channel);
msg->addS32("ButtonIndex", 0);
msg->addString("ButtonLabel", message);
gAgent.sendReliableMessage();
}
void SHCommandHandler::send_chat_to_object(const std::string &message, int channel, LLViewerObject *pTargetObject)
{
if(pTargetObject)
send_chat_to_object(message,channel,pTargetObject->getID());
}
CMD_SCRIPT(preloadanim)
{
//args[1] = anim uuid
gAssetStorage->getAssetData(args[1],LLAssetType::AT_ANIMATION,(LLGetAssetCallback)NULL,NULL,TRUE);
}
CMD_SCRIPT(key2name)
{
struct CCacheNameResponder
{
const std::string mIdent;
const int mChannel;
const LLUUID mSourceID;
CCacheNameResponder(const std::string &ident,const int chan,const LLUUID &source) :
mIdent(ident),mChannel(chan),mSourceID(source) {}
static void Handler(const LLUUID &id, const std::string &firstname, const std::string &lastname, BOOL group, void *pData)
{
CCacheNameResponder *pResponder = (CCacheNameResponder*)pData;
std::string out_str = "key2namereply|"+pResponder->mIdent+"|"+firstname+" "+lastname;
SHCommandHandler::send_chat_to_object(out_str, pResponder->mChannel, pResponder->mSourceID);
delete pResponder;
}
};
//args[1] = identifier
//args[2] = av id
//args[3] = chan
//args[4] = group
gCacheName->get(args[2],args[4],&CCacheNameResponder::Handler, new CCacheNameResponder(args[1],args[3],callerid));
return;
}
CMD_SCRIPT(getsex)
{
//args[1] = identifier
//args[2] = target id
//args[3] = chan
LLVOAvatar* pAvatar = gObjectList.findAvatar(args[2]);
if(pAvatar)
SHCommandHandler::send_chat_to_object(llformat("getsexreply|%s|%d",args[1].asString().c_str(),pAvatar->getVisualParamWeight("male")), args[3], callerid);
else
SHCommandHandler::send_chat_to_object(llformat("getsexreply|%s|-1",args[1].asString().c_str()), args[3], callerid);
}
CMD_SCRIPT(getwindowsize)
{
//args[1] = identifier
//args[2] = chan
const std::string out_msg = llformat("getwindowsizereply|%s|%d|%d",
args[1].asString().c_str(),
gViewerWindow->getWindowDisplayHeight(),
gViewerWindow->getWindowDisplayWidth());
SHCommandHandler::send_chat_to_object(out_msg, args[2], callerid);
}
CMD_SCRIPT(gettext)
{
//args[1] = target id
//args[2] = chan
LLViewerObject *pObject = gObjectList.findObject(args[1]);
if(pObject)
{
std::string out_msg = pObject->getDebugText();
if(!out_msg.empty())
SHCommandHandler::send_chat_to_object(out_msg,args[2],callerid);
}
}
#endif //shy_mod

View File

@@ -0,0 +1,105 @@
#if SHY_MOD //Command handler
#include "llviewerobject.h"
#include "llagentdata.h"
#include "llcontrol.h"
class SHCommandHandler
{
public:
typedef void(*command_fn_t)(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller);
private:
//Dispatch handled through a function pointer because doing it via class deriviation requires constructors each time
// which makes macroing ugly.
command_fn_t mDispatchFn;
//Static initialization fiasco avoidance
static std::list<SHCommandHandler*> &getScriptCommandList();
static std::list<SHCommandHandler*> &getChatCommandList();
public:
//ctor/dtors
SHCommandHandler(bool from_chat, command_fn_t callback);
//Virtuals:
//Virtual destructors in abstract classes are a good thing.
virtual ~SHCommandHandler() {}
//Must override in derived classes.
virtual const std::string &getName() const = 0;
//Call the function pointed to if set.
virtual void Dispatch(const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller) //Overrideable
{
if(mDispatchFn)
(mDispatchFn)(this,args,full_str,callerid,pCaller);
}
//Statics:
//Iterate through commands and run Dispatch on any matches.
static bool handleCommand(bool from_chat, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller);
//Self-explanatory
static void send_chat_to_object(const std::string &message, int channel, const LLUUID &target_id = gAgentID);
static void send_chat_to_object(const std::string &message, int channel, LLViewerObject *pTargetObject);
};
class SHDynamicCommand : public SHCommandHandler
{
private:
LLCachedControl<std::string> *pControl;
public:
//ctor/dtors
SHDynamicCommand(bool from_chat, const std::string &str, command_fn_t callback, LLControlGroup *pGroup)
: SHCommandHandler(from_chat,callback), pControl(new LLCachedControl<std::string>(str,""))
{}
SHDynamicCommand(bool from_chat, const std::string &str, command_fn_t callback, LLControlGroup &pGroup = gSavedSettings)
: SHCommandHandler(from_chat,callback), pControl(new LLCachedControl<std::string>(str,""))
{}
//Virtuals:
virtual ~SHDynamicCommand()
{
if(pControl)
delete pControl;
}
virtual const std::string &getName() const
{
static const std::string empty_str;
return pControl ? pControl->get() : empty_str;
}
};
class SHCommand : public SHCommandHandler
{
private:
const std::string mCommandName;
public:
SHCommand(bool from_chat, const std::string &str, command_fn_t callback)
: SHCommandHandler(from_chat,callback), mCommandName(str)
{}
virtual const std::string &getName() const
{
return mCommandName;
}
};
#define SETUP_SETTING_CMD(type, varname, group, chat) \
void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller); \
SHDynamicCommand cmd_cls_##type##_##varname(chat,#varname,&cmd_dispatch_##type##_##varname,group); \
void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller)
#define SETUP_STATIC_CMD(type, varname, chat) \
void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller); \
SHCommand cmd_cls_##type##_##varname(chat,#varname,&cmd_dispatch_##type##_##varname); \
void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller )
//Specify control group
#define CMD_SCRIPT_SETTING(varname,group) SETUP_SETTING_CMD(script,varname,group,false)
#define CMD_CHAT_SETTING(varname,group) SETUP_SETTING_CMD(chat,varname,group,true)
//command name is static
#define CMD_SCRIPT(varname) SETUP_STATIC_CMD(script,varname,false)
#define CMD_CHAT(varname) SETUP_STATIC_CMD(chat,varname,true)
#endif //shy_mod

View File

@@ -311,12 +311,12 @@ Use #f for user's first name, #l for last name,
label="Enable Clouds" left="10"
mouse_opaque="true" name="enable_clouds" radio_style="false"
width="400" />
<check_box bottom_delta="-20" left_delta="10" control_name="SkyUseClassicClouds" enabled="true"
<check_box bottom_delta="-20" left_delta="10" control_name="SkyUseClassicClouds" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Enable Classic Clouds" left="10"
mouse_opaque="true" name="enable_classic_clouds" radio_style="false"
width="400" />
<check_box bottom_delta="-20" left_delta="-10" control_name="SpeedRez" enabled="true"
<check_box bottom_delta="-20" left_delta="-10" control_name="SpeedRez" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
label="Enable speed-rezzing via draw distance stepping" left="10"
mouse_opaque="true" name="speed_rez_check" radio_style="false"