diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index ff62b703e..ced65d1d9 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -44,7 +44,12 @@ #define OCT_ERRS LL_WARNS("OctreeErrors") #endif +#if LL_DEBUG #define LL_OCTREE_PARANOIA_CHECK 0 +#else +#define LL_OCTREE_PARANOIA_CHECK 0 +#endif + #define LL_OCTREE_MAX_CAPACITY 128 template class LLOctreeNode; @@ -295,7 +300,7 @@ public: //if this is a redundant insertion, error out (should never happen) if (mData.find(data) != mData.end()) { - llwarns << "Redundant octree insertion detected. " << data << llendl; + llerrs << "Redundant octree insertion detected. " << data << llendl; return false; } #endif @@ -313,16 +318,9 @@ public: child = getChild(i); if (child->isInside(data->getPositionGroup())) { - // - // tempfix, test, shitsux - //child->insert(data); - if(child->getElementCount() < LL_OCTREE_MAX_CAPACITY) - { - child->insert(data); - return false; - } - //return false; - // + llassert(child->getElementCount() <= LL_OCTREE_MAX_CAPACITY); + child->insert(data); + return false; } } diff --git a/indra/newview/floatervoicelicense.cpp b/indra/newview/floatervoicelicense.cpp index 0b9ac5bc7..753c4bee6 100644 --- a/indra/newview/floatervoicelicense.cpp +++ b/indra/newview/floatervoicelicense.cpp @@ -127,9 +127,13 @@ BOOL FloaterVoiceLicense::postBuild() { // start to observe it so we see navigate complete events web_browser->addObserver( this ); - - gResponsePtr = LLIamHereVoice::build( this ); - LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); + std::string url = getString( "real_url" ); + if(url.substr(0,4) == "http") { + gResponsePtr = LLIamHereVoice::build( this ); + LLHTTPClient::get( url, gResponsePtr ); + } else { + setSiteIsAlive(false); + } } return TRUE; @@ -145,11 +149,7 @@ void FloaterVoiceLicense::setSiteIsAlive( bool alive ) { // navigate to the "real" page std::string real_url = getString( "real_url" ); - if (real_url.find("http://") == 0) { - web_browser->navigateTo(real_url); - } else { - web_browser->navigateToLocalPage("license",real_url); - } + web_browser->navigateTo(real_url); } } else diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 3bb62ea03..b56385962 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -116,6 +116,78 @@ void validate_drawable(LLDrawable* drawablep) #define validate_drawable(x) #endif +class LLOctreeStateCheck : public LLOctreeTraveler +{ +public: + U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS]; + + LLOctreeStateCheck() + { + for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) + { + mInheritedMask[i] = 0; + } + } + + virtual void traverse(const LLSpatialGroup::OctreeNode* node) + { + LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); + + node->accept(this); + + + U32 temp[LLViewerCamera::NUM_CAMERAS]; + + for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) + { + temp[i] = mInheritedMask[i]; + mInheritedMask[i] |= group->mOcclusionState[i] & LLSpatialGroup::OCCLUDED; + } + + for (U32 i = 0; i < node->getChildCount(); i++) + { + traverse(node->getChild(i)); + } + + for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) + { + mInheritedMask[i] = temp[i]; + } + } + + + virtual void visit(const LLOctreeNode* state) + { + LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0); + + for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) + { + if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i])) + { + llerrs << "Spatial group failed inherited mask test." << llendl; + } + } + + if (group->isState(LLSpatialGroup::DIRTY)) + { + assert_parent_state(group, LLSpatialGroup::DIRTY); + } + } + + void assert_parent_state(LLSpatialGroup* group, LLSpatialGroup::eSpatialState state) + { + LLSpatialGroup* parent = group->getParent(); + while (parent) + { + if (!parent->isState(state)) + { + llerrs << "Spatial group failed parent state check." << llendl; + } + parent = parent->getParent(); + } + } +}; + S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad) { @@ -421,15 +493,17 @@ void validate_draw_info(LLDrawInfo& params) { if (indicesp[i] < (U16)params.mStart) { - llerrs << "Draw batch has vertex buffer index out of range error (index too low)." << llendl; + llerrs << "Draw batch has vertex buffer index out of range error (index too low). " + << "indicesp["< (U16)params.mEnd) { - llerrs << "Draw batch has vertex buffer index out of range error (index too high)." << llendl; + llerrs << "Draw batch has vertex buffer index out of range error (index too high)." + << "indicesp["< -{ -public: - U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS]; - - LLOctreeStateCheck() - { - for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) - { - mInheritedMask[i] = 0; - } - } - - virtual void traverse(const LLSpatialGroup::OctreeNode* node) - { - LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - - node->accept(this); - - - U32 temp[LLViewerCamera::NUM_CAMERAS]; - - for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) - { - temp[i] = mInheritedMask[i]; - mInheritedMask[i] |= group->mOcclusionState[i] & LLSpatialGroup::OCCLUDED; - } - - for (U32 i = 0; i < node->getChildCount(); i++) - { - traverse(node->getChild(i)); - } - - for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) - { - mInheritedMask[i] = temp[i]; - } - } - - - virtual void visit(const LLOctreeNode* state) - { - LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0); - - for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) - { - if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i])) - { - llerrs << "Spatial group failed inherited mask test." << llendl; - } - } - - if (group->isState(LLSpatialGroup::DIRTY)) - { - assert_parent_state(group, LLSpatialGroup::DIRTY); - } - } - - void assert_parent_state(LLSpatialGroup* group, LLSpatialGroup::eSpatialState state) - { - LLSpatialGroup* parent = group->getParent(); - while (parent) - { - if (!parent->isState(state)) - { - llerrs << "Spatial group failed parent state check." << llendl; - } - parent = parent->getParent(); - } - } -}; - - void LLSpatialPartition::renderDebug() { if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE | diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e955962d6..a9fc5c5f8 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3077,7 +3077,15 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) avatar->clearNameFromChat(); } } else { + if (key.isNull()) { + llwarns << "Nameplate from chat on NULL avatar (ignored)" << llendl; + return; + } LLVOAvatar *avatar = gObjectList.findAvatar(key); + if (!avatar) { + llwarns << "Nameplate from chat on invalid avatar (ignored)" << llendl; + return; + } if (mesg.size() == 39) { avatar->clearNameFromChat(); } else if (mesg[39] == ' ') { diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 964661d48..167a3b9bd 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -909,6 +909,13 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { + // Don't commit suicide just because someone thinks you are on a ledge. -SG + if (objectp == gAgent.getAvatarObject()) + { + objectp->setRegion(gAgent.getRegion()); + return FALSE; + } + // When we're killing objects, all we do is mark them as dead. // We clean up the dead objects later. diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index b840ff29a..02458fbc9 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -80,7 +80,7 @@ const S32 RLVa_VERSION_PATCH = 3; const S32 RLVa_VERSION_BUILD = 2; // Uncomment before a final release -//#define RLV_RELEASE +#define RLV_RELEASE // The official viewer version we're patching against #define RLV_MAKE_TARGET(x, y, z) ((x << 16) | (y << 8) | z) @@ -117,7 +117,7 @@ const S32 RLVa_VERSION_BUILD = 2; #define RLV_ROOT_FOLDER "#RLV" #define RLV_CMD_PREFIX '@' #define RLV_PUTINV_PREFIX "#RLV/~" -#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL +#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL #define RLV_FOLDER_FLAG_NOSTRIP "nostrip" #define RLV_FOLDER_PREFIX_HIDDEN '.' diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml index 68875efc1..dda31df7b 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml @@ -85,7 +85,7 @@ + min_val="0" mouse_opaque="true" name="afk_timeout_spinner" width="202" />