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.cpp74
1 files changed, 59 insertions, 15 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 41b2c4b44b..d64c0aa0d5 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -310,6 +310,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mAttachmentItemID(LLUUID::null),
mLastUpdateType(OUT_UNKNOWN),
mLastUpdateCached(false),
+ mLocked(false),
mCachedMuteListUpdateTime(0),
mCachedOwnerInMuteList(false),
mRiggedAttachedWarned(false)
@@ -1290,7 +1291,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#endif
//clear cost and linkset cost
setObjectCostStale();
- if (isSelected())
+ if (isSelected() && gFloaterTools)
{
gFloaterTools->dirty();
}
@@ -1729,7 +1730,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#endif
setObjectCostStale();
- if (isSelected())
+ if (isSelected() && gFloaterTools)
{
gFloaterTools->dirty();
}
@@ -2325,6 +2326,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
setRotation(new_rot * mAngularVelocityRot);
+ if ((mFlags & FLAGS_SERVER_AUTOPILOT) && asAvatar() && asAvatar()->isSelf())
+ {
+ gAgent.resetAxes();
+ gAgent.rotate(new_rot);
+ gAgentCamera.resetView();
+ }
setChanged(ROTATED | SILHOUETTE);
}
@@ -2928,15 +2935,15 @@ void LLViewerObject::fetchInventoryFromServer()
else
{
LL_WARNS() << "Using old task inventory path!" << LL_ENDL;
- // Results in processTaskInv
- LLMessageSystem *msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_RequestTaskInventory);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_InventoryData);
- msg->addU32Fast(_PREHASH_LocalID, mLocalID);
- msg->sendReliable(mRegionp->getHost());
+ // Results in processTaskInv
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_RequestTaskInventory);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_InventoryData);
+ msg->addU32Fast(_PREHASH_LocalID, mLocalID);
+ msg->sendReliable(mRegionp->getHost());
}
}
}
@@ -3885,7 +3892,7 @@ void LLViewerObject::setObjectCost(F32 cost)
mObjectCost = cost;
mCostStale = false;
- if (isSelected())
+ if (isSelected() && gFloaterTools)
{
gFloaterTools->dirty();
}
@@ -3905,7 +3912,7 @@ void LLViewerObject::setLinksetCost(F32 cost)
iter++;
}
- if (needs_refresh)
+ if (needs_refresh && gFloaterTools)
{
gFloaterTools->dirty();
}
@@ -3916,7 +3923,7 @@ void LLViewerObject::setPhysicsCost(F32 cost)
mPhysicsCost = cost;
mCostStale = false;
- if (isSelected())
+ if (isSelected() && gFloaterTools)
{
gFloaterTools->dirty();
}
@@ -3927,7 +3934,7 @@ void LLViewerObject::setLinksetPhysicsCost(F32 cost)
mLinksetPhysicsCost = cost;
mCostStale = false;
- if (isSelected())
+ if (isSelected() && gFloaterTools)
{
gFloaterTools->dirty();
}
@@ -4820,6 +4827,18 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, bool damped)
else
{
setPositionRegion(pos_parent, damped);
+
+ // #1964 mark reflection probe in the linkset to update position after moving via script
+ for (LLViewerObject* child : mChildList)
+ {
+ if (child && child->isReflectionProbe())
+ {
+ if (LLDrawable* drawablep = child->mDrawable)
+ {
+ gPipeline.markMoved(drawablep);
+ }
+ }
+ }
}
}
@@ -7670,6 +7689,31 @@ void LLViewerObject::setGLTFAsset(const LLUUID& id)
updateVolume(volume_params);
}
+void LLViewerObject::clearTEWaterExclusion(const U8 te)
+{
+ if (permModify())
+ {
+ LLViewerTexture* image = getTEImage(te);
+ if (image && (IMG_ALPHA_GRAD == image->getID()))
+ {
+ // reset texture to default plywood
+ setTEImage(te, LLViewerTextureManager::getFetchedTexture(DEFAULT_OBJECT_TEXTURE, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+
+ // reset texture repeats, that might be altered by invisiprim script from wiki
+ U32 s_axis, t_axis;
+ if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis))
+ {
+ return;
+ }
+ F32 DEFAULT_REPEATS = 2.f;
+ F32 new_s = getScale().mV[s_axis] * DEFAULT_REPEATS;
+ F32 new_t = getScale().mV[t_axis] * DEFAULT_REPEATS;
+
+ setTEScale(te, new_s, new_t);
+ sendTEUpdate();
+ }
+ }
+}
class ObjectPhysicsProperties : public LLHTTPNode
{