diff options
Diffstat (limited to 'indra/newview')
36 files changed, 299 insertions, 218 deletions
diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index d77da8814c..d39fc3a8d1 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -48,6 +48,23 @@ export SDL_VIDEO_X11_DGAMOUSE=0 RUN_PATH=`dirname "$0" || echo .` cd "${RUN_PATH}" +if [ -n "$LL_TCMALLOC" ]; then + tcmalloc_libs='/usr/lib/libtcmalloc.so.0 /usr/lib/libstacktrace.so.0 /lib/libpthread.so.0' + all=1 + for f in $tcmalloc_libs; do + if [ ! -f $f ]; then + all=0 + fi + done + if [ $all != 1 ]; then + echo 'Cannot use tcmalloc libraries: components missing' 1>&2 + else + export LD_PRELOAD=$(echo $tcmalloc_libs | tr ' ' :) + if [ -z "$HEAPCHECK" -a -z "$HEAPPROFILE" ]; then + export HEAPCHECK=${HEAPCHECK:-normal} + fi + fi +fi LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" $LL_WRAPPER bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat echo diff --git a/indra/newview/llface.h b/indra/newview/llface.h index a304d52f13..3a9c76cfc1 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -21,7 +21,6 @@ #include "lldarrayptr.h" #include "llvertexbuffer.h" #include "llviewerimage.h" -#include "llpagemem.h" #include "llstat.h" #include "lldrawable.h" diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp index 4f1da916fc..7e0a64c420 100644 --- a/indra/newview/llfloaterfriends.cpp +++ b/indra/newview/llfloaterfriends.cpp @@ -71,6 +71,7 @@ LLFloaterFriends::LLFloaterFriends() : gSavedSettings.setBOOL("ShowFriends", TRUE); // Builds and adds to gFloaterView gUICtrlFactory->buildFloater(this, "floater_friends.xml"); + refreshUI(); } LLFloaterFriends::~LLFloaterFriends() @@ -196,7 +197,6 @@ BOOL LLFloaterFriends::postBuild() childSetAction("remove_btn", onClickRemove, this); childSetAction("close_btn", onClickClose, this); - refreshUI(); return TRUE; } diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index daf3067d7b..388e8d9cbd 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -54,18 +54,21 @@ BOOL LLFloaterInspect::isVisible() void LLFloaterInspect::show(void* ignored) { - if(sInstance) - { - sInstance->open(); - } - else + // setForceSelection ensures that the pie menu does not deselect things when it + // looses the focus (this can happen with "select own objects only" enabled + // VWR-1471 + BOOL forcesel = gSelectMgr->setForceSelection(TRUE); + + if (!sInstance) // first use { - LLFloaterInspect* self = new LLFloaterInspect; - self->open(); + sInstance = new LLFloaterInspect; } - sInstance->mObjectSelection = gSelectMgr->getSelection(); + sInstance->open(); select_tool(gToolInspect); + gSelectMgr->setForceSelection(forcesel); // restore previouis value + + sInstance->mObjectSelection = gSelectMgr->getSelection(); sInstance->refresh(); } diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 1cf10ae881..0ba75b71f6 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -31,10 +31,12 @@ LLFloaterScriptDebug* LLFloaterScriptDebug::sInstance = NULL; // // Member Functions // -LLFloaterScriptDebug::LLFloaterScriptDebug() -: LLMultiFloater() +LLFloaterScriptDebug::LLFloaterScriptDebug() : + LLMultiFloater() { - + // avoid resizing of the window to match + // the initial size of the tabbed-childs, whenever a tab is opened or closed + mAutoResize = FALSE; } LLFloaterScriptDebug::~LLFloaterScriptDebug() @@ -90,6 +92,9 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) } LLFloater::setFloaterHost(NULL); + // Tabs sometimes overlap resize handle + sInstance->moveResizeHandleToFront(); + return floaterp; } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index b47ec270e3..80e32f9c00 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -105,7 +105,7 @@ public: void updateSnapshot(BOOL new_snapshot); LLFloaterPostcard* savePostcard(); void saveTexture(); - void saveLocal(); + BOOL saveLocal(); static void onIdle( void* snapshot_preview ); @@ -678,9 +678,9 @@ void LLSnapshotLivePreview::saveTexture() gViewerStats->incStat(LLViewerStats::ST_SNAPSHOT_COUNT ); } -void LLSnapshotLivePreview::saveLocal() +BOOL LLSnapshotLivePreview::saveLocal() { - gViewerWindow->saveImageNumbered(mRawImage); + return gViewerWindow->saveImageNumbered(mRawImage); } ///---------------------------------------------------------------------------- @@ -939,6 +939,8 @@ void LLFloaterSnapshot::Impl::onClickKeep(void* data) if (previewp) { + BOOL succeeded = TRUE; // Only used for saveLocal for now + if (previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) { LLFloaterPostcard* floater = previewp->savePostcard(); @@ -957,21 +959,24 @@ void LLFloaterSnapshot::Impl::onClickKeep(void* data) } else { - previewp->saveLocal(); + succeeded = previewp->saveLocal(); } if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) { view->close(); - // only plays sound and anim when keeping a snapshot, and closing the snapshot UI - gViewerWindow->playSnapshotAnimAndSound(); + // only plays sound and anim when keeping a snapshot, and closing the snapshot UI, + // and only if the save succeeded (i.e. was not canceled) + if (succeeded) + { + gViewerWindow->playSnapshotAnimAndSound(); + } } else { checkAutoSnapshot(previewp); } } - } // static diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 350a20607c..244583464a 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -422,12 +422,25 @@ void LLHUDEffectLookAt::update() } } +/** + * Initializes the mTargetPos member from the current mSourceObjec and mTargetObject + * (and possibly mTargetOffsetGlobal). + * When mTargetObject is another avatar, it sets mTargetPos to be their eyes. + * + * Has the side-effect of also calling setAnimationData("LookAtPoint") with the new + * mTargetPos on the source object which is assumed to be an avatar. + */ void LLHUDEffectLookAt::calcTargetPosition() { - LLViewerObject *targetObject = (LLViewerObject *)mTargetObject; + if (gNoRender) + { + return; + } + + LLViewerObject *target_obj = (LLViewerObject *)mTargetObject; LLVector3 local_offset; - if (targetObject) + if (target_obj) { local_offset.setVec(mTargetOffsetGlobal); } @@ -436,20 +449,16 @@ void LLHUDEffectLookAt::calcTargetPosition() local_offset = gAgent.getPosAgentFromGlobal(mTargetOffsetGlobal); } - if (gNoRender) - { - return; - } - LLVector3 head_position = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition(); + LLVOAvatar* source_avatar = (LLVOAvatar*)(LLViewerObject*)mSourceObject; - if (targetObject && targetObject->mDrawable.notNull()) + if (target_obj && target_obj->mDrawable.notNull()) { - LLQuaternion objRot; - if (targetObject->isAvatar()) + LLQuaternion target_rot; + if (target_obj->isAvatar()) { - LLVOAvatar *avatarp = (LLVOAvatar *)targetObject; + LLVOAvatar *target_av = (LLVOAvatar *)target_obj; - BOOL looking_at_self = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->isSelf() && avatarp->isSelf(); + BOOL looking_at_self = source_avatar->isSelf() && target_av->isSelf(); // if selecting self, stare forward if (looking_at_self && mTargetOffsetGlobal.magVecSquared() < MIN_TARGET_OFFSET_SQUARED) @@ -459,46 +468,46 @@ void LLHUDEffectLookAt::calcTargetPosition() local_offset.setVec(mTargetOffsetGlobal); } - mTargetPos = avatarp->mHeadp->getWorldPosition(); + // look the other avatar in the eye. note: what happens if target is self? -MG + mTargetPos = target_av->mHeadp->getWorldPosition(); if (mTargetType == LOOKAT_TARGET_MOUSELOOK || mTargetType == LOOKAT_TARGET_FREELOOK) { // mouselook and freelook target offsets are absolute - objRot = LLQuaternion::DEFAULT; + target_rot = LLQuaternion::DEFAULT; } else if (looking_at_self && gAgent.cameraCustomizeAvatar()) { // *NOTE: We have to do this because animation // overrides do not set lookat behavior. // *TODO: animation overrides for lookat behavior. - objRot = avatarp->mPelvisp->getWorldRotation(); + target_rot = target_av->mPelvisp->getWorldRotation(); } else { - objRot = avatarp->mRoot.getWorldRotation(); + target_rot = target_av->mRoot.getWorldRotation(); } } - else + else // target obj is not an avatar { - if (targetObject->mDrawable->getGeneration() == -1) + if (target_obj->mDrawable->getGeneration() == -1) { - mTargetPos = targetObject->getPositionAgent(); - objRot = targetObject->getWorldRotation(); + mTargetPos = target_obj->getPositionAgent(); + target_rot = target_obj->getWorldRotation(); } else { - mTargetPos = targetObject->getRenderPosition(); - objRot = targetObject->getRenderRotation(); + mTargetPos = target_obj->getRenderPosition(); + target_rot = target_obj->getRenderRotation(); } } - mTargetPos += (local_offset * objRot); + mTargetPos += (local_offset * target_rot); } - else + else // no target obj or it's not drawable { mTargetPos = local_offset; } - mTargetPos -= head_position; - - ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->setAnimationData("LookAtPoint", (void *)&mTargetPos); + mTargetPos -= source_avatar->mHeadp->getWorldPosition(); + source_avatar->setAnimationData("LookAtPoint", (void *)&mTargetPos); } diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index b2278f2752..015f90a180 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -236,11 +236,10 @@ void LLFloaterIMPanel::init(const LLString& session_label) mSessionStartMsgPos = mHistoryEditor->getText().length(); - bool log_to_file = false; addHistoryLine( session_start, LLColor4::grey, - log_to_file); + false); } } } @@ -748,7 +747,17 @@ void LLFloaterIMPanel::sendMsg() history_echo += ": "; } history_echo += utf8_text; + + + BOOL other_was_typing = mOtherTyping; + addHistoryLine(history_echo); + + if (other_was_typing) + { + addTypingIndicator(mOtherTypingName); + } + } } else @@ -850,7 +859,7 @@ void LLFloaterIMPanel::processIMTyping(const LLIMInfo* im_info, BOOL typing) if (typing) { // other user started typing - addTypingIndicator(im_info); + addTypingIndicator(im_info->mName); } else { @@ -860,15 +869,18 @@ void LLFloaterIMPanel::processIMTyping(const LLIMInfo* im_info, BOOL typing) } -void LLFloaterIMPanel::addTypingIndicator(const LLIMInfo* im_info) +void LLFloaterIMPanel::addTypingIndicator(const std::string &name) { - mTypingLineStartIndex = mHistoryEditor->getText().length(); - - LLUIString typing_start = sTypingStartString; - typing_start.setArg("[NAME]", im_info->mName); - bool log_to_file = false; - addHistoryLine(typing_start, LLColor4::grey, log_to_file); - mOtherTyping = TRUE; + // we may have lost a "stop-typing" packet, don't add it twice + if (!mOtherTyping) + { + mTypingLineStartIndex = mHistoryEditor->getText().length(); + LLUIString typing_start = sTypingStartString; + typing_start.setArg("[NAME]", name); + addHistoryLine(typing_start, LLColor4::grey, false); + mOtherTypingName = name; + mOtherTyping = TRUE; + } } diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 28ea002583..cb8042e010 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -105,7 +105,7 @@ private: void setTyping(BOOL typing); // Add the "User is typing..." indicator. - void addTypingIndicator(const LLIMInfo* im_info); + void addTypingIndicator(const std::string &name); // Remove the "User is typing..." indicator. void removeTypingIndicator(); @@ -145,6 +145,9 @@ private: // Is other user currently typing? BOOL mOtherTyping; + // name of other user who is currently typing + std::string mOtherTypingName; + // Where does the "User is typing..." line start? S32 mTypingLineStartIndex; //Where does the "Starting session..." line start? diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5a40b4a7c1..336da9ac79 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -111,6 +111,11 @@ static LLUUID compute_session_id(EInstantMessage dialog, LLFloaterIM::LLFloaterIM() { + // autoresize=false is necessary to avoid resizing of the IM window whenever + // a session is opened or closed (it would otherwise resize the window to match + // the size of the im-sesssion when they were created. This happens in + // LLMultiFloater::resizeToContents() when called through LLMultiFloater::addFloater()) + this->mAutoResize = FALSE; gUICtrlFactory->buildFloater(this, "floater_im.xml"); } @@ -186,12 +191,16 @@ void LLFloaterIM::onClose(bool app_quitting) //virtual void LLFloaterIM::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point) { +/* + Code removed via patch from VWR-1626 + // this code is needed to fix the bug where new IMs received will resize the IM floater. // SL-29075, SL-24556, and others LLRect parent_rect = getRect(); S32 dheight = LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT; LLRect rect(0, parent_rect.getHeight()-dheight, parent_rect.getWidth(), 0); floaterp->reshape(rect.getWidth(), rect.getHeight(), TRUE); +*/ LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); } diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp index 7fd2572e08..4bf8f0fa73 100644 --- a/indra/newview/llmemoryview.cpp +++ b/indra/newview/llmemoryview.cpp @@ -25,10 +25,20 @@ #include "llfasttimer.h" + + LLMemoryView::LLMemoryView(const std::string& name, const LLRect& rect) -: LLView(name, rect, TRUE) +: LLView(name, rect, TRUE), +mDelay(120) { setVisible(FALSE); + mDumpTimer.reset(); + +#ifdef MEM_DUMP_DATA + // clear out file. + FILE *dump = fopen("memusagedump.txt", "w"); + fclose(dump); +#endif } LLMemoryView::~LLMemoryView() @@ -176,7 +186,7 @@ void LLMemoryView::draw() peak += maxbytes; S32 mbytes = bytes >> 20; - tdesc = llformat("%s [%4d MB]",mtv_display_table[i].desc,mbytes); + tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]); LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); y -= (texth + 2); @@ -219,7 +229,46 @@ void LLMemoryView::draw() y -= (texth + 2); } + dumpData(); + #endif LLView::draw(); } + +void LLMemoryView::setDataDumpInterval(float delay) +{ + mDelay = delay; +} + +void LLMemoryView::dumpData() +{ +#if MEM_TRACK_TYPE && MEM_DUMP_DATA + if (mDelay && (mDumpTimer.getElapsedTimeF32() > mDelay )) + { + // reset timer + mDumpTimer.reset(); + // append dump info to text file + FILE *dump = fopen("memusagedump.txt", "a"); + + if (dump) + { + // write out total memory usage + fprintf (dump, "Total memory in use = %09d (%03d MB)\n", LLMemType::sTotalMem, LLMemType::sTotalMem>>20); + fprintf (dump, "High Water Mark = %09d (%03d MB)\n\n", LLMemType::sMaxTotalMem, LLMemType::sMaxTotalMem>>20); + // dump out usage of 'new' for each memory type + for (S32 i=0; i<LLMemType::MTYPE_NUM_TYPES; i++) + { + if (LLMemType::sMemCount[i]) + { + std::string outData = llformat("MEM: % 20s %09d %03d MB (%09d %03d MB) in %06d News", LLMemType::sTypeDesc[i], LLMemType::sMemCount[i], LLMemType::sMemCount[i]>>20, LLMemType::sMaxMemCount[i], LLMemType::sMaxMemCount[i]>>20, LLMemType::sNewCount[i]); + fprintf (dump, "%s\n", outData.c_str()); + } + } + fprintf (dump, "\n\n"); + + fclose(dump); + } + } +#endif +} diff --git a/indra/newview/llmemoryview.h b/indra/newview/llmemoryview.h index f32242d06c..c566fa3b73 100644 --- a/indra/newview/llmemoryview.h +++ b/indra/newview/llmemoryview.h @@ -26,6 +26,13 @@ public: virtual void draw(); private: + void setDataDumpInterval(float delay); + void dumpData(); + + float mDelay; + LLFrameTimer mDumpTimer; + +private: }; #endif diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index 27de489446..8e36297c93 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -101,7 +101,11 @@ LLOverlayBar::LLOverlayBar(const std::string& name, const LLRect& rect) if ( gAudiop ) { - mMusicRemote->setVolume ( gSavedSettings.getF32 ( "AudioLevelMusic" ) ); + //HACK / NOT HACK + //maintenance patch - bhear obsoletes this, do not merge (poppy) + F32 audioLevelMusic = gSavedSettings.getF32 ( "AudioLevelMusic" ); + mMusicRemote->setVolume ( audioLevelMusic ); + gAudiop->setInternetStreamGain ( audioLevelMusic ); mMusicRemote->setTransportState ( LLMediaRemoteCtrl::Stop, FALSE ); }; diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 801b06ba55..d9d933400f 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -15,6 +15,7 @@ #include "llmemory.h" #include "llviewerimage.h" #include "llstring.h" +#include "llmd5.h" class LLTextBox; class LLLineEditor; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 07e3853b27..9c9c5a9582 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2029,6 +2029,13 @@ void LLLiveLSLEditor::saveIfNeeded() return; } LLString utf8text = mScriptEd->mEditor->getText(); + + // Special case for a completely empty script - stuff in one space so it can store properly. See SL-46889 + if ( utf8text.size() == 0 ) + { + utf8text = " "; + } + fputs(utf8text.c_str(), fp); fclose(fp); fp = NULL; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 0ab674dfcd..54ac03a3c5 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -527,7 +527,7 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id) return object_found; } -void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim) +void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim, BOOL include_entire_object) { // bail if nothing selected or if object wasn't selected in the first place if(!object) return; @@ -535,7 +535,30 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s // Collect all of the objects, and remove them LLDynamicArray<LLViewerObject*> objects; - object = (LLViewerObject*)object->getRoot(); + + if (include_entire_object) + { + // Since we're selecting a family, start at the root, but + // don't include an avatar. + LLViewerObject* root = object; + + while(!root->isAvatar() && root->getParent() && !root->isJointChild()) + { + LLViewerObject* parent = (LLViewerObject*)root->getParent(); + if (parent->isAvatar()) + { + break; + } + root = parent; + } + + object = root; + } + else + { + object = (LLViewerObject*)object->getRoot(); + } + object->addThisAndAllChildren(objects); remove(objects); @@ -5734,6 +5757,12 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object) return TRUE; } +BOOL LLSelectMgr::setForceSelection(BOOL force) +{ + std::swap(mForceSelection,force); + return force; +} + LLObjectSelection::LLObjectSelection() : std::list<LLSelectNode*>(), LLRefCount(), diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 283516671d..4986843798 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -219,7 +219,8 @@ public: void updateEffects(); // Update HUD effects void overrideObjectUpdates(); - void setForceSelection(BOOL force) { mForceSelection = force; } + // Returns the previous value of mForceSelection + BOOL setForceSelection(BOOL force); //////////////////////////////////////////////////////////////// // Selection methods @@ -253,7 +254,7 @@ public: //////////////////////////////////////////////////////////////// void deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim = TRUE); - void deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim = TRUE); + void deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim = TRUE, BOOL include_entire_object = FALSE); // Send deselect messages to simulator, then clear the list void deselectAll(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index be6756ad98..6d939ad3e9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -763,12 +763,7 @@ BOOL idle_startup() LLFile::mkdir(gDirUtilp->getChatLogsDir().c_str()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir().c_str()); - -#if LL_WINDOWS - if (gSavedSettings.getBOOL("UseDebugLogin") && show_connect_box) -#else if (show_connect_box) -#endif { LLString server_label; S32 domain_name_index; @@ -779,10 +774,7 @@ BOOL idle_startup() { snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */ } - } - if (show_connect_box) - { LLString location; LLPanelLogin::getLocation( location ); LLURLSimString::setString( location ); @@ -1139,8 +1131,10 @@ BOOL idle_startup() case LLUserAuth::E_COULDNT_RESOLVE_HOST: case LLUserAuth::E_SSL_PEER_CERTIFICATE: case LLUserAuth::E_UNHANDLED_ERROR: + case LLUserAuth::E_SSL_CACERT: + case LLUserAuth::E_SSL_CONNECT_ERROR: default: - if (auth_uri_num >= (int) auth_uris.size()) + if (auth_uri_num >= (int) auth_uris.size() - 1) { emsg << "Unable to connect to " << gSecondLife << ".\n"; emsg << gUserAuthp->errorMessage(); @@ -1150,20 +1144,6 @@ BOOL idle_startup() auth_desc = s.str(); gStartupState = STATE_LOGIN_AUTHENTICATE; auth_uri_num++; - return do_normal_idle; - } - break; - case LLUserAuth::E_SSL_CACERT: - case LLUserAuth::E_SSL_CONNECT_ERROR: - if (auth_uri_num >= (int) auth_uris.size()) - { - emsg << "Unable to establish a secure connection to the login server.\n"; - emsg << gUserAuthp->errorMessage(); - } else { - std::ostringstream s; - s << "Logging in (attempt " << (auth_uri_num + 1) << "). "; - auth_desc = s.str(); - gStartupState = STATE_LOGIN_AUTHENTICATE; auth_uri_num++; return do_normal_idle; } @@ -2342,9 +2322,15 @@ BOOL idle_startup() void login_show() { llinfos << "Initializing Login Screen" << llendl; - + +#ifdef LL_RELEASE_FOR_DOWNLOAD + BOOL bUseDebugLogin = gSavedSettings.getBOOL("UseDebugLogin"); +#else + BOOL bUseDebugLogin = TRUE; +#endif + LLPanelLogin::show( gViewerWindow->getVirtualWindowRect(), - gSavedSettings.getBOOL("UseDebugLogin"), + bUseDebugLogin, login_callback, NULL ); llinfos << "Decoding Images" << llendl; diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 0182cae3b7..94f758f054 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -107,7 +107,7 @@ protected: static std::vector<std::string> sDays; static std::vector<std::string> sMonths; - static const U32 LLStatusBar::MAX_DATE_STRING_LENGTH; + static const U32 MAX_DATE_STRING_LENGTH; }; // *HACK: Status bar owns your cached money balance. JC diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 475fc4a0d1..4068b15fbb 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -115,7 +115,7 @@ LLHandle<LLObjectSelection> LLToolSelect::handleObjectSelection(LLViewerObject * } else { - gSelectMgr->deselectObjectAndFamily(object); + gSelectMgr->deselectObjectAndFamily(object, TRUE, TRUE); } } else diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 090276ef51..53fbd9a178 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -30,16 +30,17 @@ extern LLPipeline gPipeline; //----------------------------------------------------------------------------- // LLViewerJointAttachment() //----------------------------------------------------------------------------- -LLViewerJointAttachment::LLViewerJointAttachment() +LLViewerJointAttachment::LLViewerJointAttachment() : +mJoint(NULL), +mAttachedObject(NULL), +mAttachmentDirty(FALSE), +mVisibleInFirst(FALSE), +mGroup(0), +mIsHUDAttachment(FALSE), +mPieSlice(-1) { - mJoint = NULL; - mAttachedObject = NULL; - mAttachmentDirty = FALSE; - mGroup = 0; - mUpdateXform = FALSE; - mIsHUDAttachment = FALSE; mValid = FALSE; - mPieSlice = -1; + mUpdateXform = FALSE; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d6bfe66dc8..12ebca3b82 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -715,7 +715,7 @@ void init_client_menu(LLMenuGL* menu) // neither of these works particularly well at the moment /*menu->append(new LLMenuItemCallGL( "Reload UI XML", &reload_ui, - NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ) );*/ + NULL, NULL) );*/ /*menu->append(new LLMenuItemCallGL("Reload settings/colors", &handle_reload_settings, NULL, NULL));*/ menu->append(new LLMenuItemCallGL("Reload personal setting overrides", @@ -873,7 +873,7 @@ void init_client_menu(LLMenuGL* menu) (void*)"LimitSelectDistance")); menu->append(new LLMenuItemToggleGL("Disable Camera Constraints", - &LLViewerCamera::sDisableCameraConstraints)); + &LLViewerCamera::sDisableCameraConstraints, 'C', MASK_ALT | MASK_CONTROL )); menu->append(new LLMenuItemCheckGL("Joystick Flycam", &handle_toggle_flycam,NULL,&check_flycam,NULL)); @@ -1075,39 +1075,39 @@ void init_debug_rendering_menu(LLMenuGL* menu) sub_menu->append(new LLMenuItemCheckGL("UI", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, '1', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, KEY_F1, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Selected", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, '2', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, KEY_F2, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Highlighted", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, '3', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, KEY_F3, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Dynamic Textures", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, '4', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, KEY_F4, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL( "Foot Shadows", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, '5', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, KEY_F5, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Fog", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, '6', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Palletized Textures", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_PALETTE, '7', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_PALETTE, KEY_F7, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Test FRInfo", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, '8', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, KEY_F8, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL( "Flexible Objects", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, '9', MASK_ALT|MASK_CONTROL)); + (void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, KEY_F9, MASK_ALT|MASK_CONTROL)); sub_menu->createJumpKeys(); ///////////////////////////// @@ -1279,7 +1279,7 @@ void init_debug_avatar_menu(LLMenuGL* menu) menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget)); menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments)); - menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures)); + menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL )); #ifndef LL_RELEASE_FOR_DOWNLOAD menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT)); menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT )); @@ -2322,10 +2322,11 @@ void handle_buy_object(LLSaleInfo sale_info) return; } - if(sale_info.getSalePrice() > gStatusBar->getBalance()) + S32 price = sale_info.getSalePrice(); + + if (price > 0 && price > gStatusBar->getBalance()) { - LLFloaterBuyCurrency::buyCurrency( - "This object costs", sale_info.getSalePrice()); + LLFloaterBuyCurrency::buyCurrency("This object costs", price); return; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7adfba7776..3ee72b3d17 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -43,6 +43,7 @@ #include "message.h" #include "sound_ids.h" #include "lltimer.h" +#include "llmd5.h" #include "llagent.h" #include "llcallingcard.h" diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index b80aabab34..2ac131ac91 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -41,7 +41,11 @@ #include "u64.h" #include "llviewerimagelist.h" #include "lldatapacker.h" -#include <zlib/zlib.h> +#ifdef LL_STANDALONE +#include <zlib.h> +#else +#include "zlib/zlib.h" +#endif #include "object_flags.h" extern BOOL gVelocityInterpolate; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 21365fa3b9..ed97cd3ec2 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -160,8 +160,7 @@ LLViewerParcelMgr::~LLViewerParcelMgr() delete[] mCollisionSegments; mCollisionSegments = NULL; - // weird, this crashes if I use an array delete on it! - delete sPackedOverlay; + delete[] sPackedOverlay; sPackedOverlay = NULL; delete[] mAgentParcelOverlay; diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 9b7e44a523..476326147c 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -21,7 +21,7 @@ #include "llworld.h" #include "pipeline.h" -const S32 MAX_PART_COUNT = 4096; +const S32 MAX_PART_COUNT = 8192; // VWR-1105 const F32 PART_SIM_BOX_SIDE = 16.f; const F32 PART_SIM_BOX_OFFSET = 0.5f*PART_SIM_BOX_SIDE; diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 96e8863ec8..414d94e8ad 100644 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -285,6 +285,12 @@ void LLViewerPartSourceScript::update(const F32 dt) //llwarns << "Unknown source pattern " << (S32)mPartSysData.mPattern << llendl; } + if (part->mFlags & LLPartData::LL_PART_FOLLOW_SRC_MASK || // SVC-193, VWR-717 + part->mFlags & LLPartData::LL_PART_TARGET_LINEAR_MASK) + { + mPartSysData.mBurstRadius = 0; + } + gWorldPointer->mPartSim.addPart(part); } diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index e08c040855..26bf41f8a2 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -72,7 +72,6 @@ #include "llmap.h" #include "llmemory.h" #include "llnametable.h" -#include "llpagemem.h" #include "llpriqueuemap.h" #include "llprocessor.h" #include "llptrskiplist.h" @@ -125,7 +124,6 @@ #include "llcoordframe.h" #include "llcrc.h" #include "llinterp.h" -#include "llmd5.h" #include "llperlin.h" #include "llplane.h" #include "llquantize.h" diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7fed7ebe94..223286b1c9 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -301,89 +301,15 @@ void LLViewerRegion::sendReliableMessage() gMessageSystem->sendReliable(mHost); } - -void LLViewerRegion::setAllowDamage(BOOL b) -{ - if (b) - { - mRegionFlags |= REGION_FLAGS_ALLOW_DAMAGE; - } - else - { - mRegionFlags &= ~REGION_FLAGS_ALLOW_DAMAGE; - } -} - - -void LLViewerRegion::setAllowLandmark(BOOL b) -{ - if (b) - { - mRegionFlags |= REGION_FLAGS_ALLOW_LANDMARK; - } - else - { - mRegionFlags &= ~REGION_FLAGS_ALLOW_LANDMARK; - } -} - -void LLViewerRegion::setAllowSetHome(BOOL b) -{ - if (b) - { - mRegionFlags |= REGION_FLAGS_ALLOW_SET_HOME; - } - else - { - mRegionFlags &= ~REGION_FLAGS_ALLOW_SET_HOME; - } -} - -void LLViewerRegion::setResetHomeOnTeleport(BOOL b) -{ - if (b) - { - mRegionFlags |= REGION_FLAGS_RESET_HOME_ON_TELEPORT; - } - else - { - mRegionFlags &= ~REGION_FLAGS_RESET_HOME_ON_TELEPORT; - } -} - -void LLViewerRegion::setSunFixed(BOOL b) -{ - if (b) - { - mRegionFlags |= REGION_FLAGS_SUN_FIXED; - } - else - { - mRegionFlags &= ~REGION_FLAGS_SUN_FIXED; - } -} - -void LLViewerRegion::setBlockFly(BOOL b) -{ - if (b) - { - mRegionFlags |= REGION_FLAGS_BLOCK_FLY; - } - else - { - mRegionFlags &= ~REGION_FLAGS_BLOCK_FLY; - } -} - -void LLViewerRegion::setAllowDirectTeleport(BOOL b) +void LLViewerRegion::setFlags(BOOL b, U32 flags) { if (b) { - mRegionFlags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT; + mRegionFlags |= flags; } else { - mRegionFlags &= ~REGION_FLAGS_ALLOW_DIRECT_TELEPORT; + mRegionFlags &= ~flags; } } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index e971efeedf..ec36c0bd0b 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -63,13 +63,14 @@ public: void setOriginGlobal(const LLVector3d &origin); void setAgentOffset(const LLVector3d &offset); - void setAllowDamage(BOOL b); - void setAllowLandmark(BOOL b); - void setAllowSetHome(BOOL b); - void setResetHomeOnTeleport(BOOL b); - void setSunFixed(BOOL b); - void setBlockFly(BOOL b); - void setAllowDirectTeleport(BOOL b); + void setAllowDamage(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_DAMAGE); } + void setAllowLandmark(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_LANDMARK); } + void setAllowSetHome(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_SET_HOME); } + void setResetHomeOnTeleport(BOOL b) { setFlags(b, REGION_FLAGS_RESET_HOME_ON_TELEPORT); } + void setSunFixed(BOOL b) { setFlags(b, REGION_FLAGS_SUN_FIXED); } + void setBlockFly(BOOL b) { setFlags(b, REGION_FLAGS_BLOCK_FLY); } + void setAllowDirectTeleport(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_DIRECT_TELEPORT); } + inline BOOL getAllowDamage() const; inline BOOL getAllowLandmark() const; @@ -228,6 +229,7 @@ public: protected: void disconnectAllNeighbors(); void initStats(); + void setFlags(BOOL b, U32 flags); public: LLWind mWind; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5763f988de..d04dda9109 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1279,7 +1279,9 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) else { mActive = FALSE; - gAgent.setAFK(); + if (gAllowIdleAFK) { + gAgent.setAFK(); + } send_agent_pause(); if (mWindow->getFullscreen() && !mIgnoreActivate) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 540cd1f04b..12149ecf77 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4183,7 +4183,7 @@ void LLVOAvatar::updateTextures(LLAgent &agent) if( render_avatar ) { - mShadowImagep->addTextureStats(mPixelArea, 1.f); + mShadowImagep->addTextureStats(mPixelArea); } } @@ -5790,7 +5790,7 @@ BOOL LLVOAvatar::attachObject(LLViewerObject *viewer_object) { LLViewerJointAttachment* attachment = getTargetAttachmentPoint(viewer_object); - if (!attachment->addObject(viewer_object)) + if (!attachment || !attachment->addObject(viewer_object)) { return FALSE; } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 418a810f6a..fc1d8f1711 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -316,16 +316,13 @@ void LLVOGrass::setPixelAreaAndAngle(LLAgent &agent) // BUG could speed this up by caching the relative_position and range calculations void LLVOGrass::updateTextures(LLAgent &agent) { - F32 texel_area_ratio = 1.f; - F32 cos_angle = 1.f; - if (getTEImage(0)) { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA)) { setDebugText(llformat("%4.0f", fsqrtf(mPixelArea))); } - getTEImage(0)->addTextureStats(mPixelArea, texel_area_ratio, cos_angle); + getTEImage(0)->addTextureStats(mPixelArea); } } diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 9995a8e462..4c0855be29 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -415,7 +415,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co drawablep->updateFaceSize(j); LLFace* facep = drawablep->getFace(j); - if (!facep->hasGeometry()) + if ( !facep || !facep->hasGeometry()) { continue; } diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index f67188ff05..bc0f0c5662 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -386,15 +386,13 @@ void LLVOTree::setPixelAreaAndAngle(LLAgent &agent) void LLVOTree::updateTextures(LLAgent &agent) { - F32 texel_area_ratio = 1.f; - F32 cos_angle = 1.f; if (mTreeImagep) { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA)) { setDebugText(llformat("%4.0f", fsqrtf(mPixelArea))); } - mTreeImagep->addTextureStats(mPixelArea, texel_area_ratio, cos_angle); + mTreeImagep->addTextureStats(mPixelArea); } } diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b310ea515c..4acef46474 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -413,7 +413,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libstdc++.so.6") self.path("libuuid.so", "libuuid.so.1") self.path("libSDL-1.2.so.0") - #self.path("libresolv.so") - don't bundle + self.path("libELFIO.so") #self.path("libtcmalloc.so.0") - bugged #self.path("libstacktrace.so.0") - probably bugged self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason |