summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-20 15:22:30 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-03-20 15:22:30 -0700
commita2fc83de1e3f47accee9387f2710727edc9e27d4 (patch)
treec42214d7cf7cf5f5d0824bfe59666f69561873cf /indra/newview
parentd3550dfcd64cfc182fd120338d3e7eb25ac339af (diff)
BUGFIX: Removing server warning notification that occurs when attempting to use the inner tubes on the premium wilderness region. The updateFlags() was being called while processing a server message, which would result in erroneous data being posted back to the server.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp20
-rw-r--r--indra/newview/llviewerobject.h1
3 files changed, 16 insertions, 9 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 05f1be5de5..92c665d9c1 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4735,7 +4735,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
LLViewerObject* object = gObjectList.findObject(object_id);
if (object)
{
- object->setFlags(FLAGS_ANIM_SOURCE, TRUE);
+ object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, TRUE);
BOOL anim_found = FALSE;
LLVOAvatar::AnimSourceIterator anim_it = avatarp->mAnimationSources.find(object_id);
@@ -4882,7 +4882,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat
LLViewerObject* objectp = gObjectList.findObject(source_id);
if (objectp)
{
- objectp->setFlags(FLAGS_CAMERA_SOURCE, TRUE);
+ objectp->setFlagsWithoutUpdate(FLAGS_CAMERA_SOURCE, TRUE);
}
S32 num_objects = mesgsys->getNumberOfBlocks("CameraProperty");
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 48351f4575..a821a7e482 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5378,6 +5378,19 @@ void LLViewerObject::updateFlags(BOOL physics_changed)
BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
{
+ BOOL setit = setFlagsWithoutUpdate(flags, state);
+
+ // BUG: Sometimes viewer physics and simulator physics get
+ // out of sync. To fix this, always send update to simulator.
+// if (setit)
+ {
+ updateFlags();
+ }
+ return setit;
+}
+
+BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state)
+{
BOOL setit = FALSE;
if (state)
{
@@ -5395,13 +5408,6 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
setit = TRUE;
}
}
-
- // BUG: Sometimes viewer physics and simulator physics get
- // out of sync. To fix this, always send update to simulator.
-// if (setit)
- {
- updateFlags();
- }
return setit;
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index ee1bac28ca..192121c021 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -513,6 +513,7 @@ public:
void updateFlags(BOOL physics_changed = FALSE);
BOOL setFlags(U32 flag, BOOL state);
+ BOOL setFlagsWithoutUpdate(U32 flag, BOOL state);
void setPhysicsShapeType(U8 type);
void setPhysicsGravity(F32 gravity);
void setPhysicsFriction(F32 friction);