summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp56
1 files changed, 48 insertions, 8 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d4346ee2d9..691a2e14d3 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -313,7 +313,9 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mLastUpdateCached(FALSE),
mCachedMuteListUpdateTime(0),
mCachedOwnerInMuteList(false),
- mRiggedAttachedWarned(false)
+ mRiggedAttachedWarned(false),
+ mIsMirror(false),
+ mMirrorFace(3)
{
if (!is_global)
{
@@ -1147,6 +1149,39 @@ U32 LLViewerObject::extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector
return parent_id;
}
+void detectMirror(const std::string &str, bool &mirror, U8 &mode)
+{
+
+ std::stringstream ss(str);
+ std::string word;
+ while (ss >> word)
+ {
+ if (word == "IsMirror")
+ {
+ mirror = true;
+ }
+
+ if (mirror)
+ {
+ bool num = false;
+ std::string::const_iterator it = word.begin();
+ while (it != word.end())
+ {
+ num = std::isdigit(*it);
+ ++it;
+
+ if (!num)
+ break;
+ }
+
+ if (num)
+ {
+ mode = atoi(word.c_str());
+ }
+ }
+ }
+}
+
U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
void **user_data,
U32 block_num,
@@ -1523,11 +1558,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
std::string temp_string;
mesgsys->getStringFast(_PREHASH_ObjectData, _PREHASH_Text, temp_string, block_num );
+ detectMirror(temp_string, mIsMirror, mMirrorFace);
+
LLColor4U coloru;
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_TextColor, coloru.mV, 4, block_num);
-
+
// alpha was flipped so that it zero encoded better
coloru.mV[3] = 255 - coloru.mV[3];
+
mText->setColor(LLColor4(coloru));
mText->setString(temp_string);
@@ -1907,6 +1945,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
{
std::string temp_string;
dp->unpackString(temp_string, "Text");
+
+ detectMirror(temp_string, mIsMirror, mMirrorFace);
+
LLColor4U coloru;
dp->unpackBinaryDataFixed(coloru.mV, 4, "Color");
coloru.mV[3] = 255 - coloru.mV[3];
@@ -5041,11 +5082,6 @@ void LLViewerObject::updateTEMaterialTextures(U8 te)
LLViewerObject* obj = gObjectList.findObject(id);
if (obj)
{
- LLViewerRegion* region = obj->getRegion();
- if(region)
- {
- region->loadCacheMiscExtras(obj->getLocalID());
- }
obj->markForUpdate();
}
});
@@ -5354,7 +5390,6 @@ S32 LLViewerObject::setTEFullbright(const U8 te, const U8 fullbright)
return retval;
}
-
S32 LLViewerObject::setTEMediaFlags(const U8 te, const U8 media_flags)
{
// this might need work for media type
@@ -6293,6 +6328,11 @@ LLViewerObject::ExtraParameter* LLViewerObject::createNewParameterEntry(U16 para
new_block = new LLReflectionProbeParams();
break;
}
+ case LLNetworkData::PARAMS_MIRROR:
+ {
+ new_block = new LLMirrorParams();
+ break;
+ }
default:
{
LL_INFOS_ONCE() << "Unknown param type: " << param_type << LL_ENDL;