From ac1eed6ff3e2ef03858256da76fd8408dcc79e9a Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 20 Feb 2010 17:07:34 +0100 Subject: fix: crash on relog; appearence self pie greyed out after relog. --- linden/indra/newview/app_settings/logcontrol.xml | 29 ++++++++++------- linden/indra/newview/llagent.cpp | 9 ++++++ linden/indra/newview/llagent.h | 5 ++- linden/indra/newview/llappviewer.cpp | 11 ++++--- linden/indra/newview/lltexturefetch.cpp | 3 +- linden/indra/newview/lltoolpie.cpp | 15 ++++----- linden/indra/newview/lltoolpie.h | 3 +- linden/indra/newview/llviewermenu.cpp | 40 +++++++++++++++++++----- linden/indra/newview/llviewermenu.h | 7 +++-- linden/indra/newview/llviewerobject.cpp | 1 + linden/indra/newview/llviewerparcelmgr.cpp | 1 + linden/indra/newview/llviewerparceloverlay.cpp | 1 + linden/indra/newview/llviewerregion.cpp | 13 +++++++- linden/indra/newview/llvoavatar.cpp | 22 ++++++++----- linden/indra/newview/llvoavatardefines.h | 3 +- linden/indra/newview/llwlparammanager.cpp | 6 ++-- 16 files changed, 120 insertions(+), 49 deletions(-) diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index 9179887..e0a5dc0 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml @@ -40,29 +40,34 @@ tags - DBUS + + XMLNode + --> diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 8c455a5..ebdbc53 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -450,6 +450,7 @@ void LLAgent::init() mEffectColor = gSavedSettings.getColor4("EffectColor"); mInitialized = TRUE; + LL_DEBUGS("VOAvatar")<< "ctor of LLAgent" << LL_ENDL; } //----------------------------------------------------------------------------- @@ -462,6 +463,9 @@ void LLAgent::cleanup() mShowAvatar = TRUE; setSitCamera(LLUUID::null); + + mAvatarObject->markDead(); + mAvatarObject = NULL; if(mLookAt) { @@ -475,6 +479,7 @@ void LLAgent::cleanup() } mRegionp = NULL; setFocusObject(NULL); + LL_DEBUGS("VOAvatar")<< "LLAgent cleanup()" << LL_ENDL; } //----------------------------------------------------------------------------- @@ -482,11 +487,13 @@ void LLAgent::cleanup() //----------------------------------------------------------------------------- LLAgent::~LLAgent() { + LL_DEBUGS("VOAvatar")<< "LLAgent dtor begin" << LL_ENDL; cleanup(); delete [] mActiveCacheQueries; mActiveCacheQueries = NULL; + LL_DEBUGS("VOAvatar")<< "LLAgent dtor end" << LL_ENDL; // *Note: this is where LLViewerCamera::getInstance() used to be deleted. } @@ -7920,6 +7927,8 @@ void LLAgent::userRemoveAllClothesStep2( BOOL proceed, void* userdata ) void LLAgent::userRemoveAllAttachments( void* userdata ) { + LL_DEBUGS("VOAvatar")<< "userRemoveAllAttachments" << LL_ENDL; + LLVOAvatar* avatarp = gAgent.getAvatarObject(); if(!avatarp) { diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index a6f1d74..798de8c 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h @@ -796,9 +796,11 @@ private: std::set mRegionsVisited; // stat - what distinct regions has the avatar been to? F64 mDistanceTraveled; // stat - how far has the avatar moved? LLVector3d mLastPositionGlobal; // Used to calculate travel distance +protected: - LLPointer mAvatarObject; // NULL until avatar object sent down from simulator + LLPointer mAvatarObject; // NULL until avatar object sent down from simulator +private: U8 mRenderState; // Current behavior state of agent LLFrameTimer mTypingTimer; @@ -912,6 +914,7 @@ private: S32 mCurrentFidget; BOOL mFirstLogin; BOOL mGenderChosen; + //-------------------------------------------------------------------- // Wearables diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index bd32d28..7e22dce 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -1365,8 +1365,12 @@ bool LLAppViewer::cleanup() // PerAccountSettingsFile should be empty if no use has been logged on. // *FIX:Mani This should get really saved in a "logoff" mode. - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); - llinfos << "Saved settings" << llendflush; + std::string per_account_settings_filename = gSavedSettings.getString("PerAccountSettingsFile"); + if (!per_account_settings_filename.empty()) + { + gSavedPerAccountSettings.saveToFile(per_account_settings_filename, TRUE); + llinfos << "Saved settings" << llendflush; + } std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); // save all settings, even if equals defaults @@ -3989,7 +3993,7 @@ void LLAppViewer::disconnectViewer() // close inventory interface, close all windows LLInventoryView::cleanup(); - + cleanup_menus(); // Also writes cached agent settings to gSavedSettings gAgent.cleanup(); @@ -4000,7 +4004,6 @@ void LLAppViewer::disconnectViewer() // call all self-registered classes LLDestroyClassList::instance().fireCallbacks(); - cleanup_xfer_manager(); gDisconnected = TRUE; if (mQuitRequested) cleanup_xfer_manager(); diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 62b4c8b..4175012 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -38,6 +38,7 @@ #include "lltexturefetch.h" +#include "llappviewer.h" #include "llcurl.h" #include "lldir.h" #include "llhttpclient.h" @@ -580,7 +581,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } } - if (mFetcher->mDebugPause) + if (mFetcher->mDebugPause|| gDisconnected) { return false; // debug: don't do any work } diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 626831f..0241d81 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -149,6 +149,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) // didn't click in any UI object, so must have clicked in the world LLViewerObject *object = mPick.getObject(); LLViewerObject *parent = NULL; + bool is_self = (object == gAgent.getAvatarObject()); if (mPick.mPickType != LLPickInfo::PICK_LAND) { @@ -283,7 +284,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) } object = (LLViewerObject*)object->getParent(); } - if (object && object == gAgent.getAvatarObject()) + if (object && is_self) { // we left clicked on avatar, switch to focus mode LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); @@ -323,16 +324,16 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) effectp->setColor(LLColor4U(gAgent.getEffectColor())); effectp->setDuration(0.25f); } - else if (mPick.mObjectID == gAgent.getID() ) + else if (object && is_self) { - if(!gPieSelf) - { +// if(gPieSelf) +// { //either at very early startup stage or at late quitting stage, //this event is ignored. - return TRUE ; - } + gPieSelf->show(x, y, mPieMouseButtonDown); +// } + - gPieSelf->show(x, y, mPieMouseButtonDown); } else if (object) { diff --git a/linden/indra/newview/lltoolpie.h b/linden/indra/newview/lltoolpie.h index 83df03c..113fba7 100644 --- a/linden/indra/newview/lltoolpie.h +++ b/linden/indra/newview/lltoolpie.h @@ -83,9 +83,10 @@ private: BOOL mGrabMouseButtonDown; BOOL mMouseOutsideSlop; // for this drag, has mouse moved outside slop region LLPickInfo mPick; - LLPointer mClickActionObject; U8 mClickAction; LLSafeHandle mLeftClickSelection; +protected: + LLPointer mClickActionObject; }; diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 9d06853..9bef0d7 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -1,4 +1,3 @@ - /** * @file llviewermenu.cpp * @brief Builds menus out of items. @@ -588,11 +587,6 @@ void set_underclothes_menu_options() void init_menus() { - if (gMenuHolder) - { - cleanup_menus(); - } - S32 top = gViewerWindow->getRootView()->getRect().getHeight(); S32 width = gViewerWindow->getRootView()->getRect().getWidth(); @@ -1551,9 +1545,39 @@ static std::vector > sMenus; //----------------------------------------------------------------------------- void cleanup_menus() { + LL_DEBUGS("AFK") << "cleanup_menus start" << LL_ENDL; + sMenus.clear(); + delete gMenuParcelObserver; gMenuParcelObserver = NULL; + + delete gAttachPieMenu; + gAttachPieMenu = NULL; + + delete gDetachPieMenu; + gDetachPieMenu = NULL; + + delete gAttachScreenPieMenu; + gAttachScreenPieMenu = NULL; + + delete gDetachScreenPieMenu; + gDetachScreenPieMenu = NULL; + + for (int i = 0 ; i < 8 ; i++) + { + if (gAttachBodyPartPieMenus[i]) + { + delete gAttachBodyPartPieMenus[i]; + gAttachBodyPartPieMenus[i] = NULL; + } + if (gAttachBodyPartPieMenus[i]) + { + delete gDetachBodyPartPieMenus[i]; + gDetachBodyPartPieMenus[i] = NULL; + } + } + delete gPieSelf; gPieSelf = NULL; @@ -1581,7 +1605,6 @@ void cleanup_menus() delete gMenuHolder; gMenuHolder = NULL; - sMenus.clear(); } //----------------------------------------------------------------------------- @@ -2764,6 +2787,7 @@ class LLAvatarEnableFreezeEject : public view_listener_t if (new_value) { + LL_DEBUGS("isOwnedSelf")<< " viewermenu" << LL_ENDL; new_value = region->isOwnedSelf(pos); if (!new_value || region->isOwnedGroup(pos)) { @@ -6524,7 +6548,9 @@ class LLAttachmentEnableDrop : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { if (gDisconnected) + { return true; + } BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild()); //Add an inventory observer to only allow dropping the newly attached item diff --git a/linden/indra/newview/llviewermenu.h b/linden/indra/newview/llviewermenu.h index 560edc8..632f783 100644 --- a/linden/indra/newview/llviewermenu.h +++ b/linden/indra/newview/llviewermenu.h @@ -153,13 +153,14 @@ extern LLPieMenu *gPieHUD; extern LLPieMenu *gPieLand; // Pie menus +/* extern LLPieMenu *gPieSelfSimple; extern LLPieMenu *gPieAvatarSimple; extern LLPieMenu *gPieObjectSimple; extern LLPieMenu *gPieAttachmentSimple; extern LLPieMenu *gPieHUDSimple; extern LLPieMenu *gPieLandSimple; - +*/ // Needed to build menus when attachment site list available extern LLMenuGL* gAttachSubMenu; extern LLMenuGL* gDetachSubMenu; @@ -173,8 +174,8 @@ extern LLPieMenu* gDetachBodyPartPieMenus[8]; extern LLMenuItemCallGL* gAFKMenu; extern LLMenuItemCallGL* gBusyMenu; -extern LLMenuItemCallGL* gMutePieMenu; -extern LLMenuItemCallGL* gMuteObjectPieMenu; +//extern LLMenuItemCallGL* gMutePieMenu; +//extern LLMenuItemCallGL* gMuteObjectPieMenu; extern LLMenuItemCallGL* gBuyPassPieMenu; #endif diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index ca741c4..7a1d50f 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -485,6 +485,7 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list) // agent. BOOL LLViewerObject::isOverAgentOwnedLand() const { + LL_DEBUGS("isOwnedSelf")<< " LLViewerObject::isOverAgentOwnedLand()" << LL_ENDL; return mRegionp && mRegionp->getParcelOverlay() && mRegionp->getParcelOverlay()->isOwnedSelf(getPositionRegion()); diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index b0e1e78..eb8d93c 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -690,6 +690,7 @@ BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const { + LL_DEBUGS("isOwnedSelf")<< "LLViewerParcelMgr" << LL_ENDL; LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global ); if (!region) return FALSE; diff --git a/linden/indra/newview/llviewerparceloverlay.cpp b/linden/indra/newview/llviewerparceloverlay.cpp index 5cea9c2..0bcd8f3 100644 --- a/linden/indra/newview/llviewerparceloverlay.cpp +++ b/linden/indra/newview/llviewerparceloverlay.cpp @@ -132,6 +132,7 @@ BOOL LLViewerParcelOverlay::isOwned(const LLVector3& pos) const BOOL LLViewerParcelOverlay::isOwnedSelf(const LLVector3& pos) const { + LL_DEBUGS("VOAvatar")<< "LLViewerParcelOverlay" << LL_ENDL; S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); return (PARCEL_SELF == ownership(row, column)); diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index 1d380d7..69405d2 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp @@ -199,6 +199,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, } else { + delete mParcelOverlay; mParcelOverlay = NULL; } @@ -244,6 +245,7 @@ void LLViewerRegion::initStats() LLViewerRegion::~LLViewerRegion() { + LL_DEBUGS("VOAvatar")<< "LLViewerRegion dtor begin" << llendl; if(mHttpResponderPtr) { (static_cast(mHttpResponderPtr.get()))->setRegion(NULL) ; @@ -260,6 +262,7 @@ LLViewerRegion::~LLViewerRegion() delete mCompositionp; delete mParcelOverlay; + mParcelOverlay = NULL; delete mLandp; delete mEventPoll; LLHTTPSender::clearSender(mHost); @@ -267,6 +270,7 @@ LLViewerRegion::~LLViewerRegion() saveCache(); std::for_each(mObjectPartition.begin(), mObjectPartition.end(), DeletePointer()); + LL_DEBUGS("VOAvatar")<< "LLViewerRegion dtor end" << llendl; } @@ -887,12 +891,19 @@ bool LLViewerRegion::isAlive() BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos) { - if (mParcelOverlay && !gDisconnected) + if (mParcelOverlay) { + LL_DEBUGS("isOwnedSelf")<< "has mParceloverlay" << LL_ENDL; + if (gDisconnected) + { + LL_DEBUGS("isOwnedSelf")<< "but is gDisconnected" << LL_ENDL; + return FALSE; + } return mParcelOverlay->isOwnedSelf(pos); } else { + LL_DEBUGS("isOwnedSelf")<< "has NO mParceloverlay" << LL_ENDL; return FALSE; } } diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index bf96ad1..bcc8472 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -778,7 +778,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, const bool needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim ); - lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl; + LL_DEBUGS("VOAvatar") << "Constructor (" << this << ") id:" << mID << LL_ENDL; mPelvisp = NULL; @@ -823,7 +823,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, { mIsSelf = TRUE; gAgent.setAvatarObject(this); - lldebugs << "Marking avatar as self " << id << llendl; + LL_DEBUGS("VOAvatar") << "Marking avatar as self " << id << LL_ENDL; } else { @@ -1021,12 +1021,16 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; + LL_DEBUGS("VOAvatar") << "Destructor (" << this << ") id:" << mID << LL_ENDL; - if (mIsSelf) + if (this==gAgent.getAvatarObject()) { gAgent.setAvatarObject(NULL); } + else if (mIsSelf) + { + LL_DEBUGS("VOAvatar") << "Destructing Zombie from previous session." << LL_ENDL; + } mRoot.removeAllChildren(); @@ -1078,7 +1082,7 @@ LLVOAvatar::~LLVOAvatar() mAnimationSources.clear(); - lldebugs << "LLVOAvatar Destructor end" << llendl; + LL_DEBUGS("VOAvatar") << "Destructor end" << LL_ENDL; } void LLVOAvatar::markDead() @@ -1475,6 +1479,8 @@ void LLVOAvatar::cleanupClass() sAvatarXmlInfo = NULL; delete sAvatarSkeletonInfo; sAvatarSkeletonInfo = NULL; + delete sAvatarDictionary; + sAvatarDictionary = NULL; sSkeletonXMLTree.cleanup(); sXMLTree.cleanup(); } @@ -1923,7 +1929,7 @@ void LLVOAvatar::buildCharacter() } // gPrintMessagesThisFrame = TRUE; - lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << llendl; + LL_DEBUGS("VOAvatar") << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL; if ( ! status ) { @@ -2040,6 +2046,7 @@ void LLVOAvatar::buildCharacter() gAttachBodyPartPieMenus[5] = new LLPieMenu(std::string("Left Leg >")); gAttachBodyPartPieMenus[6] = new LLPieMenu(std::string("Torso >")); gAttachBodyPartPieMenus[7] = new LLPieMenu(std::string("Right Leg >")); + //gAttachBodyPartPieMenus[8] = NULL; gDetachBodyPartPieMenus[0] = NULL; gDetachBodyPartPieMenus[1] = new LLPieMenu(std::string("Right Arm >")); @@ -2049,8 +2056,9 @@ void LLVOAvatar::buildCharacter() gDetachBodyPartPieMenus[5] = new LLPieMenu(std::string("Left Leg >")); gDetachBodyPartPieMenus[6] = new LLPieMenu(std::string("Torso >")); gDetachBodyPartPieMenus[7] = new LLPieMenu(std::string("Right Leg >")); + //gDetachBodyPartPieMenus[8] = NULL; - for (S32 i = 0; i < 8; i++) + for (S32 i = 0; i < 8 ; i++) { if (gAttachBodyPartPieMenus[i]) { diff --git a/linden/indra/newview/llvoavatardefines.h b/linden/indra/newview/llvoavatardefines.h index 1da27b0..b4da140 100644 --- a/linden/indra/newview/llvoavatardefines.h +++ b/linden/indra/newview/llvoavatardefines.h @@ -1,5 +1,5 @@ /** - * @file llvoavatar.h + * @file llvoavatardefines.h * @brief Declaration of LLVOAvatar class which is a derivation fo * LLViewerObject * @@ -44,7 +44,6 @@ namespace LLVOAvatarDefines extern const S32 SCRATCH_TEX_WIDTH; extern const S32 SCRATCH_TEX_HEIGHT; extern const S32 IMPOSTOR_PERIOD; - //-------------------------------------------------------------------- // texture entry assignment //-------------------------------------------------------------------- diff --git a/linden/indra/newview/llwlparammanager.cpp b/linden/indra/newview/llwlparammanager.cpp index 081313c..46b0bb2 100644 --- a/linden/indra/newview/llwlparammanager.cpp +++ b/linden/indra/newview/llwlparammanager.cpp @@ -109,7 +109,7 @@ LLWLParamManager::~LLWLParamManager() void LLWLParamManager::loadPresets(const std::string& file_name) { std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; bool found = true; while(found) @@ -196,7 +196,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) escaped_filename += ".xml"; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename)); - llinfos << "Loading WindLight sky setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading WindLight sky setting from " << pathName << LL_ENDL; llifstream presetsXML; presetsXML.open(pathName.c_str()); @@ -205,7 +205,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) if(!presetsXML) { pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename); - llinfos << "Loading User WindLight sky setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders")<< "Loading User WindLight sky setting from " << LL_ENDL; presetsXML.open(pathName.c_str()); } -- cgit v1.1 From 6360bdffd4c513ea0d4cf59c9b1a68d7cf62f65c Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 26 Apr 2010 14:34:27 +0200 Subject: fix: Bug #163 new clothing is created in Lost&Found after logging back in. --- linden/indra/newview/llagent.cpp | 9 ++++++++- linden/indra/newview/llwearablelist.cpp | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index ebdbc53..c44fe3a 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -458,8 +458,15 @@ void LLAgent::init() //----------------------------------------------------------------------------- void LLAgent::cleanup() { - mInitialized = FALSE; + // cleanup wearables + for( S32 i = 0; i < WT_COUNT; i++ ) + { + mWearableEntry[ i ].mWearable = NULL; + mWearableEntry[ i ].mItemID.setNull(); + } mWearablesLoaded = FALSE; + + mInitialized = FALSE; mShowAvatar = TRUE; setSitCamera(LLUUID::null); diff --git a/linden/indra/newview/llwearablelist.cpp b/linden/indra/newview/llwearablelist.cpp index 954321f..7952bae 100644 --- a/linden/indra/newview/llwearablelist.cpp +++ b/linden/indra/newview/llwearablelist.cpp @@ -223,7 +223,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID // Creates a new wearable just like the old_wearable but with data copied over from item LLWearable* LLWearableList::createWearableMatchedToInventoryItem( LLWearable* old_wearable, LLViewerInventoryItem* item ) { - lldebugs << "LLWearableList::createWearableMatchedToInventoryItem()" << llendl; + LL_DEBUGS("Wearable") << "LLWearableList::createWearableMatchedToInventoryItem()" << LL_ENDL; LLTransactionID tid; LLAssetID new_asset_id; @@ -247,7 +247,7 @@ LLWearable* LLWearableList::createWearableMatchedToInventoryItem( LLWearable* ol LLWearable* LLWearableList::createCopyFromAvatar( LLWearable* old_wearable, const std::string& new_name ) { - lldebugs << "LLWearableList::createCopyFromAvatar()" << llendl; + LL_DEBUGS("Wearable") << "LLWearableList::createCopyFromAvatar()" << LL_ENDL; LLTransactionID tid; LLAssetID new_asset_id; @@ -274,7 +274,7 @@ LLWearable* LLWearableList::createCopyFromAvatar( LLWearable* old_wearable, cons LLWearable* LLWearableList::createCopy( LLWearable* old_wearable ) { - lldebugs << "LLWearableList::createCopy()" << llendl; + LL_DEBUGS("Wearable") << "LLWearableList::createCopy()" << LL_ENDL; LLTransactionID tid; LLAssetID new_asset_id; @@ -296,7 +296,7 @@ LLWearable* LLWearableList::createCopy( LLWearable* old_wearable ) LLWearable* LLWearableList::createNewWearable( EWearableType type ) { - lldebugs << "LLWearableList::createNewWearable()" << llendl; + LL_DEBUGS("Wearable") << "LLWearableList::createNewWearable()" << LL_ENDL; LLTransactionID tid; LLAssetID new_asset_id; -- cgit v1.1