diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-10-02 22:02:42 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-10-02 22:02:42 +0100 |
commit | 5bb0b393a9ee634db1fbbde2645a6374704e184c (patch) | |
tree | f4b9a28c23286443f871817dd9e4409dea4aff9b | |
parent | aacb7eb25fd4caceaafb145ed550e14cebeef665 (diff) |
SL-966 - behavior improvements and visualization, bonus removal of unrelated duplicate code in llappviewer.cpp
-rw-r--r-- | indra/newview/llappviewer.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 2 |
4 files changed, 28 insertions, 10 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 03927f2d7c..4374caacdf 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3918,12 +3918,6 @@ void LLAppViewer::requestQuit() gAgentAvatarp->updateAvatarRezMetrics(true); // force a last packet to be sent. } - // Try to send last batch of avatar rez metrics. - if (!gDisconnected && isAgentAvatarValid()) - { - gAgentAvatarp->updateAvatarRezMetrics(true); // force a last packet to be sent. - } - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); effectp->setPositionGlobal(gAgent.getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 28c02b0434..18d6e6d6e7 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -35,6 +35,8 @@ #include "llviewerregion.h" #include "llskinningutil.h" +//#pragma optimize("", off) + const F32 LLControlAvatar::MAX_LEGAL_OFFSET = 3.0f; const F32 LLControlAvatar::MAX_LEGAL_SIZE = 64.0f; @@ -111,9 +113,16 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_ LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup " << new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL; } - else if (offset_dist < max_legal_offset-1 && mPositionConstraintFixup.length()>0.01f) + else if (offset_dist < max_legal_offset-1) { - new_pos_fixup = mPositionConstraintFixup * 0.9; + if (mPositionConstraintFixup.length()>0.01f) + { + new_pos_fixup = mPositionConstraintFixup * 0.9; + } + else + { + new_pos_fixup = LLVector3(); + } LL_DEBUGS("ConstraintFix") << getFullname() << " pos fixup reduced " << new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL; } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index ee77556047..f25ab0709b 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -53,6 +53,9 @@ #include "llvolumemgr.h" #include "lltextureatlas.h" #include "llviewershadermgr.h" +#include "llcontrolavatar.h" + +//#pragma optimize("", off) static LLTrace::BlockTimerStatHandle FTM_FRUSTUM_CULL("Frustum Culling"); static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound Partition"); @@ -2170,7 +2173,19 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) gGL.diffuseColor4f(0,0.5f,0,1); // dark green break; default: - gGL.diffuseColor4f(1,0,1,1); // magenta + LLControlAvatar *cav = dynamic_cast<LLControlAvatar*>(drawable->getVObj()->asAvatar()); + if (cav) + { + bool has_pos_constraint = (cav->mPositionConstraintFixup != LLVector3()); + bool has_scale_constraint = (cav->mScaleConstraintFixup != 1.0f); + F32 r = 1.0f * has_scale_constraint; + F32 g = 1.0f * has_pos_constraint; + gGL.diffuseColor4f(r,g,0,1); + } + else + { + gGL.diffuseColor4f(1,0,1,1); // magenta + } break; } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93885a4472..b49f22007b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4169,7 +4169,7 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w if (cav) { // SL-1350: Moved to LLDrawable::updateXform() - //cav->matchVolumeTransform(); + cav->matchVolumeTransform(); } else { |