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.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index dcdb66a6d4..9ac9ef7ea6 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1161,18 +1161,25 @@ void detectMirror(const std::string &str, bool &mirror, U8 &mode)
{
mirror = true;
}
- else if (word == "ReflectedX" && mirror)
- {
- mode = 0;
- }
- else if (word == "ReflectedY" && mirror)
- {
- mode = 1;
- }
- else if (word == "ReflectedZ" && mirror)
- {
- mode = 2;
- }
+
+ 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());
+ }
+ }
}
}