aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/rlvextensions.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-16 16:39:44 -0700
committerMcCabe Maxsted2009-10-16 16:39:44 -0700
commitce82adec2a0124fe27f363653d2652b0f5c61f04 (patch)
tree35b3877b1d1fc92329a44a9a17d183b74b92890b /linden/indra/newview/rlvextensions.cpp
parentApplied patch for VWR-6787 by Alissa Sabre - 'none' text in group window not ... (diff)
downloadmeta-impy-ce82adec2a0124fe27f363653d2652b0f5c61f04.zip
meta-impy-ce82adec2a0124fe27f363653d2652b0f5c61f04.tar.gz
meta-impy-ce82adec2a0124fe27f363653d2652b0f5c61f04.tar.bz2
meta-impy-ce82adec2a0124fe27f363653d2652b0f5c61f04.tar.xz
Applied RLVa-1.0.4e_20091010_SL-1.22.11-diff.patch
Diffstat (limited to 'linden/indra/newview/rlvextensions.cpp')
-rw-r--r--linden/indra/newview/rlvextensions.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/linden/indra/newview/rlvextensions.cpp b/linden/indra/newview/rlvextensions.cpp
index 10d1c46..f31c62e 100644
--- a/linden/indra/newview/rlvextensions.cpp
+++ b/linden/indra/newview/rlvextensions.cpp
@@ -12,13 +12,14 @@
12// ============================================================================ 12// ============================================================================
13 13
14std::map<std::string, S16> RlvExtGetSet::m_DbgAllowed; 14std::map<std::string, S16> RlvExtGetSet::m_DbgAllowed;
15std::map<std::string, std::string> RlvExtGetSet::m_PseudoDebug;
15 16
16// Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h 17// Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h
17RlvExtGetSet::RlvExtGetSet() 18RlvExtGetSet::RlvExtGetSet()
18{ 19{
19 if (!m_DbgAllowed.size()) // m_DbgAllowed is static and should only be initialized once 20 if (!m_DbgAllowed.size()) // m_DbgAllowed is static and should only be initialized once
20 { 21 {
21 m_DbgAllowed.insert(std::pair<std::string, S16>("AvatarSex", DBG_READ | DBG_PSEUDO)); 22 m_DbgAllowed.insert(std::pair<std::string, S16>("AvatarSex", DBG_READ | DBG_WRITE | DBG_PSEUDO));
22 m_DbgAllowed.insert(std::pair<std::string, S16>("RenderResolutionDivisor", DBG_READ | DBG_WRITE)); 23 m_DbgAllowed.insert(std::pair<std::string, S16>("RenderResolutionDivisor", DBG_READ | DBG_WRITE));
23 #ifdef RLV_EXTENSION_CMD_GETSETDEBUG_EX 24 #ifdef RLV_EXTENSION_CMD_GETSETDEBUG_EX
24 m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_FORBIDGIVETORLV, DBG_READ)); 25 m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_FORBIDGIVETORLV, DBG_READ));
@@ -172,19 +173,27 @@ std::string RlvExtGetSet::onGetDebug(std::string strSetting)
172 return std::string(); 173 return std::string();
173} 174}
174 175
175// Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h 176// Checked: 2009-10-03 (RLVa-1.0.4e) | Added: RLVa-1.0.4e
176std::string RlvExtGetSet::onGetPseudoDebug(const std::string& strSetting) 177std::string RlvExtGetSet::onGetPseudoDebug(const std::string& strSetting)
177{ 178{
178 // Skip sanity checking because it's all done in RlvExtGetSet::onGetDebug() already 179 // Skip sanity checking because it's all done in RlvExtGetSet::onGetDebug() already
179 if ("AvatarSex" == strSetting) 180 if ("AvatarSex" == strSetting)
180 { 181 {
181 if (gAgent.getAvatarObject()) 182 std::map<std::string, std::string>::const_iterator itPseudo = m_PseudoDebug.find(strSetting);
182 return llformat("%d", (gAgent.getAvatarObject()->getSex() == SEX_MALE)); // [See LLFloaterCustomize::LLFloaterCustomize()] 183 if (itPseudo != m_PseudoDebug.end())
184 {
185 return itPseudo->second;
186 }
187 else
188 {
189 if (gAgent.getAvatarObject())
190 return llformat("%d", (gAgent.getAvatarObject()->getSex() == SEX_MALE)); // [See LLFloaterCustomize::LLFloaterCustomize()]
191 }
183 } 192 }
184 return std::string(); 193 return std::string();
185} 194}
186 195
187// Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h 196// Checked: 2009-10-10 (RLVa-1.0.4e) | Modified: RLVa-1.0.4e
188void RlvExtGetSet::onSetDebug(std::string strSetting, const std::string& strValue) 197void RlvExtGetSet::onSetDebug(std::string strSetting, const std::string& strValue)
189{ 198{
190 S16 dbgFlags; 199 S16 dbgFlags;
@@ -219,6 +228,21 @@ void RlvExtGetSet::onSetDebug(std::string strSetting, const std::string& strValu
219 pSetting->setPersist( (pSetting->isDefault()) ? ((dbgFlags & DBG_PERSIST) == DBG_PERSIST) : false ); 228 pSetting->setPersist( (pSetting->isDefault()) ? ((dbgFlags & DBG_PERSIST) == DBG_PERSIST) : false );
220 } 229 }
221 } 230 }
231 else
232 {
233 onSetPseudoDebug(strSetting, strValue);
234 }
235 }
236}
237
238// Checked: 2009-10-10 (RLVa-1.0.4e) | Modified: RLVa-1.0.4e
239void RlvExtGetSet::onSetPseudoDebug(const std::string& strSetting, const std::string& strValue)
240{
241 if ("AvatarSex" == strSetting)
242 {
243 BOOL fValue;
244 if (LLStringUtil::convertToBOOL(strValue, fValue))
245 m_PseudoDebug[strSetting] = strValue;
222 } 246 }
223} 247}
224 248