diff --git a/indra/newview/app_settings/client_definitions.xml b/indra/newview/app_settings/client_definitions.xml index f50258ed4..613419478 100644 --- a/indra/newview/app_settings/client_definitions.xml +++ b/indra/newview/app_settings/client_definitions.xml @@ -1,6 +1,6 @@ - 8873757c-092a-98fb-1afd-ecd347566fcd + 8873757c-092a-98fb-1afd-ecd347566fcd color @@ -9,182 +9,182 @@ 1 1 - multiple + multiple 0 - name + name Ascent - f12457b5-762e-52a7-efad-8f17f3b022ee + f12457b5-762e-52a7-efad-8f17f3b022ee color - 0.69999999999999996 - 0.80000000000000004 - 1.6000000238418579 + 0.7 + 0.8 + 1.6 1 - multiple + multiple 2 - name + name Anti-Life - 0f6723d2-5b23-6b58-08ab-308112b33786 + 0f6723d2-5b23-6b58-08ab-308112b33786 - color + color 0 2 2 1 - multiple + multiple 2 - name + name CryoLife - e52d21f7-3c8b-819f-a3db-65c432295dac + e52d21f7-3c8b-819f-a3db-65c432295dac - color + color 0 2 2 1 - multiple + multiple 2 - name + name CryoLife - d0091f21-1eef-a4ad-b358-249a8e5432ea + d0091f21-1eef-a4ad-b358-249a8e5432ea - color + color 0 2 2 1 - multiple + multiple 2 - name + name CryoLife - 7c4d47a3-0c51-04d1-fa47-e4f3ac12f59b + 7c4d47a3-0c51-04d1-fa47-e4f3ac12f59b - color + color 0 2 2 1 - multiple + multiple 2 - name + name CryoLife - 8183e823-c443-2142-6eb6-2ab763d4f81c + 8183e823-c443-2142-6eb6-2ab763d4f81c - color + color 0 0 1 1 - multiple + multiple 1 - name + name Day Oh proxy - 28b4da3f-5f9b-f44e-1387-6a115ab482c5 - - color - - 0.64314000000000004 - 0.89803999999999995 - 0.99607999999999997 + 28b4da3f-5f9b-f44e-1387-6a115ab482c5 + + color + + 0.64 + 0.9 + 1.0 + 1 + + multiple 1 - - multiple - 1 - name - Diamond - - 072343d0-1ce9-0952-4106-5312af4a789a + name + Diamond + + 072343d0-1ce9-0952-4106-5312af4a789a - color + color 0 2 0 1 - multiple + multiple 2 - name + name Emerald - 0ae2f973-98c1-a4e8-9f4b-9db2044ab079 + 0ae2f973-98c1-a4e8-9f4b-9db2044ab079 - color + color 0 2 0 1 - multiple + multiple 2 - name + name Emerald - 1da8eb54-a70f-bd4a-77e5-c7b815c3b2a2 + 1da8eb54-a70f-bd4a-77e5-c7b815c3b2a2 - color + color 0 2 0 1 - multiple + multiple 2 - name + name Emerald - 1e0948ab-706a-b309-434c-a694436a79be + 1e0948ab-706a-b309-434c-a694436a79be - color + color 0 2 0 1 - multiple + multiple 2 - name + name Emerald - 4eb67510-0924-ebb1-50ca-8af5694cd267 + 4eb67510-0924-ebb1-50ca-8af5694cd267 - color + color 0 2 0 1 - multiple + multiple 2 - name + name Emerald - 602243f4-8fb1-ac00-d5bc-7ab50c4433b7 + 602243f4-8fb1-ac00-d5bc-7ab50c4433b7 - color + color 0 2 @@ -280,7 +280,7 @@ name Emergence - 734fed29-4c51-63e5-1648-6589949d7585 + 734fed29-4c51-63e5-1648-6589949d7585 color @@ -326,9 +326,9 @@ color - 6.2999999999999998 + 6.3 3.5 - 7 + 7.0 1 multiple @@ -392,21 +392,7 @@ name nolife - 77662f23-c77a-9b4d-5558-26b757b2144c - - color - - 0.60000002384185791 - 0.20000000298023224 - 0.80000001192092896 - 1 - - multiple - 1 - name - PSL - - d95e0d9a-4d40-ea1b-a054-8db87f583f58 + d95e0d9a-4d40-ea1b-a054-8db87f583f58 color @@ -462,7 +448,7 @@ name Onyx - ed63fbd0-589e-fe1d-a3d0-16905efaa96b + ed63fbd0-589e-fe1d-a3d0-16905efaa96b color @@ -478,6 +464,20 @@ f3fd74a6-fee7-4b2f-93ae-ddcb5991da04 + color + + 0.60000002384185791 + 0.20000000298023224 + 0.80000001192092896 + 1 + + multiple + 1 + name + PSL + + 77662f23-c77a-9b4d-5558-26b757b2144c + color 0.60000002384185791 @@ -518,21 +518,49 @@ name Ruby - 872c0005-3095-0967-866d-11cd71115c22 + 872c0005-3095-0967-866d-11cd71115c22 - color + color 0 1 2 3 - multiple + multiple 3 - name + name Simfed - 11ad2452-ce54-8d65-7c23-05589b59f516 + 11ad2452-ce54-8d65-7c23-05589b59f516 + + color + + 0 + 0.5 + 1 + 1 + + multiple + 1 + name + VerticalLife + + e734563e-1c31-2a35-3ed5-8552c807439f + + color + + 0 + 0.5 + 1 + 1 + + multiple + 1 + name + VerticalLife + + 3ab7e2fa-9572-ef36-1a30-d855dbea4f92 color @@ -541,110 +569,82 @@ 1 1 - multiple + multiple 1 - name + name VerticalLife - e734563e-1c31-2a35-3ed5-8552c807439f + 58a8b7ec-1455-7162-5d96-d3c3ead2ed71 - color + color 0 0.5 1 1 - multiple + multiple 1 - name + name VerticalLife - 3ab7e2fa-9572-ef36-1a30-d855dbea4f92 + 841ef25b-3b90-caf9-ea3d-5649e755db65 - color + color 0 0.5 1 1 - multiple + multiple 1 - name + name VerticalLife - 58a8b7ec-1455-7162-5d96-d3c3ead2ed71 + c228d1cf-4b5d-4ba8-84f4-899a0796aa97 - color - - 0 - 0.5 - 1 - 1 - - multiple - 1 - name - VerticalLife - - 841ef25b-3b90-caf9-ea3d-5649e755db65 - - color - - 0 - 0.5 - 1 - 1 - - multiple - 1 - name - VerticalLife - - c228d1cf-4b5d-4ba8-84f4-899a0796aa97 - - color + color 1 0.55000000000000004 0.75 1 - multiple + multiple 1 - name + name Viewer 2.0 - c252d89d-6f7c-7d90-f430-d140d2e3fbbe + c252d89d-6f7c-7d90-f430-d140d2e3fbbe - color + color 1 0 0 1 - multiple + multiple 1 - name + name VLife - c58fca06-33b3-827d-d81c-a886a631affc + c58fca06-33b3-827d-d81c-a886a631affc - color + color 1 0.61175999999999997 0 1 - multiple + multiple 0 - name + name Whale - isComplete - true + isComplete + true diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a49e5a8f1..5be63db93 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10172,7 +10172,7 @@ Type Boolean Value - 1 + 0 PlayIMSound diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 632939f26..11fa26b94 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -100,6 +100,7 @@ private: BOOL mPrivateLookAt; BOOL mShowLookAt; BOOL mRevokePermsOnStandUp; + BOOL mDisableClickSit; }; @@ -189,6 +190,7 @@ void LLPrefsAscentSysImpl::refreshValues() mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt"); mShowLookAt = LLHUDEffectLookAt::sDebugLookAt; mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp"); + mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit"); } void LLPrefsAscentSysImpl::refresh() @@ -280,6 +282,7 @@ void LLPrefsAscentSysImpl::refresh() childSetValue("private_look_at_check", mPrivateLookAt); childSetValue("show_look_at_check", mShowLookAt); childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp); + childSetValue("disable_click_sit_check", mDisableClickSit); } void LLPrefsAscentSysImpl::cancel() @@ -454,6 +457,7 @@ void LLPrefsAscentSysImpl::apply() gSavedSettings.setBOOL("PrivateLookAt", childGetValue("private_look_at_check")); LLHUDEffectLookAt::sDebugLookAt = childGetValue("show_look_at_check"); gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check")); + gSavedSettings.setBOOL("DisableClickSit", childGetValue("disable_click_sit_check")); refreshValues(); refresh(); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 6b45ca1ae..85d5dbf0f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4969,14 +4969,7 @@ void LLAgent::requestStopMotion( LLMotion* motion ) void LLAgent::onAnimStop(const LLUUID& id) { // handle automatic state transitions (based on completion of animation playback) - if(id == ANIM_AGENT_STAND - // - // I really do not like doing this - || id == ANIM_AGENT_STAND_1 - || id == ANIM_AGENT_STAND_2 - || id == ANIM_AGENT_STAND_3 - || id == ANIM_AGENT_STAND_4) - // + if(LLAO::isStand(id)) { // if(LLAO::isEnabled()) diff --git a/indra/newview/llao.cpp b/indra/newview/llao.cpp index 06d5c4370..45096e667 100644 --- a/indra/newview/llao.cpp +++ b/indra/newview/llao.cpp @@ -1,24 +1,89 @@ // +/* DOUBLE EDIT REACH AROUND +Rewritten by Hg Beeks + +We will handle drag-and-drop in the future. Reminder - Look in llPreviewGesture for handleDragAndDrop. -HgB +*/ #include "llviewerprecompiledheaders.h" -#include "llao.h" -#include "llviewercontrol.h" -#include "lluictrlfactory.h" -#include "llfilepicker.h" -#include "llsdserialize.h" + #include "llagent.h" +#include "llanimstatelabels.h" +#include "llao.h" +#include "llfilepicker.h" +#include "llinventorymodel.h" +#include "llscrolllistctrl.h" +#include "llsdserialize.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" #include "llvoavatar.h" //this is for debugging ;D -//#define AO_DEBUG +#define AO_DEBUG //static variables -std::list LLAO::mStandOverrides; +std::list LLAO::mStandOverrides; +LLSD LLAO::mAnimationOverrides; +S32 LLAO::mAnimationIndex; + std::map LLAO::mOverrides; LLFloaterAO* LLFloaterAO::sInstance; BOOL LLAO::mEnabled = FALSE; F32 LLAO::mPeriod; LLAOStandTimer* LLAO::mTimer = NULL; +class ObjectNameMatches : public LLInventoryCollectFunctor +{ +public: + ObjectNameMatches(std::string name) + { + sName = name; + } + virtual ~ObjectNameMatches() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item) + { + if(item) + { + return (item->getName() == sName); + } + return false; + } +private: + std::string sName; +}; + +const LLUUID& LLAO::getAssetIDByName(const std::string& name) +{ + if (name.empty()) return LLUUID::null; + + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + ObjectNameMatches objectnamematches(name); + gInventory.collectDescendentsIf(LLUUID::null,cats,items,FALSE,objectnamematches); + + if (items.count()) + { + return items[0]->getAssetUUID(); + } + return LLUUID::null; +}; + +LLUUID LLAO::getFrontUUID() +{ + if (!LLAO::mStandOverrides.empty()) + return LLUUID(LLAO::getAssetIDByName(LLAO::mStandOverrides.front())); + else + return LLUUID::null; +} + +LLUUID LLAO::getBackUUID() +{ + if (!LLAO::mStandOverrides.empty()) + return LLUUID(LLAO::getAssetIDByName(LLAO::mStandOverrides.back())); + else + return LLUUID::null; +} + LLAOStandTimer::LLAOStandTimer(F32 period) : LLEventTimer(period) { } @@ -40,20 +105,20 @@ BOOL LLAOStandTimer::tick() if(LLAO::isStand(anim_it->first)) { //back is always last played, front is next - avatarp->stopMotion(LLAO::mStandOverrides.back()); + avatarp->stopMotion(LLAO::getBackUUID()); #ifdef AO_DEBUG - llinfos << "Stopping " << LLAO::mStandOverrides.back().asString() << llendl; + //llinfos << "Stopping " << LLAO::mStandOverrides.back() << llendl; #endif - avatarp->startMotion(LLAO::mStandOverrides.front()); + avatarp->startMotion(LLAO::getFrontUUID()); #ifdef AO_DEBUG - llinfos << "Starting " << LLAO::mStandOverrides.front().asString() << llendl; + //llinfos << "Starting " << LLAO::mStandOverrides.front() << llendl; #endif LLAO::mStandOverrides.push_back(LLAO::mStandOverrides.front()); LLAO::mStandOverrides.pop_front(); LLFloaterAO* ao = LLFloaterAO::sInstance; if(ao) { - ao->mStandsCombo->setSimple(LLStringExplicit(LLAO::mStandOverrides.back().asString())); + //ao->mStandsCombo->setSimple(LLStringExplicit(LLAO::mStandOverrides.back().asString())); } break; } @@ -73,10 +138,10 @@ void LLAOStandTimer::pause() if (avatarp) { #ifdef AO_DEBUG - llinfos << "Stopping " << LLAO::mStandOverrides.back().asString() << llendl; + //llinfos << "Stopping " << LLAO::mStandOverrides.back() << llendl; #endif - gAgent.sendAnimationRequest(LLAO::mStandOverrides.back(), ANIM_REQUEST_STOP); - avatarp->stopMotion(LLAO::mStandOverrides.back()); + gAgent.sendAnimationRequest(LLAO::getBackUUID(), ANIM_REQUEST_STOP); + avatarp->stopMotion(LLAO::getBackUUID()); } mEventTimer.reset(); mEventTimer.stop(); @@ -93,26 +158,38 @@ void LLAOStandTimer::resume() if (avatarp) { #ifdef AO_DEBUG - llinfos << "Starting " << LLAO::mStandOverrides.back().asString() << llendl; + //llinfos << "Starting " << LLAO::mStandOverrides.back() << llendl; #endif - gAgent.sendAnimationRequest(LLAO::mStandOverrides.back(), ANIM_REQUEST_START); - avatarp->startMotion(LLAO::mStandOverrides.back()); + gAgent.sendAnimationRequest(LLAO::getBackUUID(), ANIM_REQUEST_START); + avatarp->startMotion(LLAO::getBackUUID()); } mEventTimer.reset(); mEventTimer.start(); mPaused = FALSE; } +// Used for sorting +struct SortItemPtrsByName +{ + bool operator()(const LLInventoryItem* i1, const LLInventoryItem* i2) + { + return (LLStringUtil::compareDict(i1->getName(), i2->getName()) < 0); + } +}; + + void LLAOStandTimer::reset() { mEventTimer.reset(); } + //static void LLAO::setup() { mEnabled = gSavedSettings.getBOOL("AO.Enabled"); mPeriod = gSavedSettings.getF32("AO.Period"); mTimer = new LLAOStandTimer(mPeriod); + mAnimationIndex = 0; gSavedSettings.getControl("AO.Enabled")->getSignal()->connect(boost::bind(&handleAOEnabledChanged, _1)); gSavedSettings.getControl("AO.Period")->getSignal()->connect(boost::bind(&handleAOPeriodChanged, _1)); } @@ -179,41 +256,42 @@ BOOL LLAO::isStand(LLUUID _id) if(id == "f22fed8b-a5ed-2c93-64d5-bdd8b93c889f") return TRUE; return FALSE; } + +BOOL LLAO::isVoice(LLUUID _id) +{ + std::string id = _id.asString(); + //ALL KNOWN VOICE ANIMS + if(id == "3557510a-5eb4-d0ce-0b91-67c72aa75312") return TRUE; + if(id == "a71890f1-0dab-8744-fd47-7defaf411dbf") return TRUE; + if(id == "c1802201-5f4e-366f-7f78-2d08ec6ea54a") return TRUE; + if(id == "68db359f-4c9c-0932-5f1e-e95e3a0b19bc") return TRUE; + if(id == "7ef0d5c0-3346-06e4-5cfc-f081db108baa") return TRUE; + if(id == "28a3f544-268d-da71-7da6-82c8dd522cb9") return TRUE; + if(id == "cc340155-3e9d-60fe-d8e3-9e9abc7062d1") return TRUE; + if(id == "55fe6788-8a16-d998-2f63-3c1eab2b6009") return TRUE; + if(id == "69d5a8ed-9ec6-6dac-842f-d92d82e69428") return TRUE; + if(id == "9a7f3201-7bbd-4f75-b762-24270536e4e3") return TRUE; + if(id == "37694185-3107-d418-3a20-0181424e542d") return TRUE; + if(id == "cb1139b6-e7c3-fdc7-a9c1-e21673d7a50e") return TRUE; + if(id == "bbf194d1-a118-1312-998b-8145cec6eaff") return TRUE; + if(id == "593e9a3d-58d8-c594-d6dd-f4b98965202e") return TRUE; + if(id == "2b78c24a-2451-6135-fc49-ad274552bb68") return TRUE; + if(id == "0f645c60-3151-2805-b6f7-28e710ed22ac") return TRUE; + return FALSE; +} + //static void LLAO::refresh() { mOverrides.clear(); - mStandOverrides.clear(); + mAnimationOverrides.clear(); LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings"); //S32 version = (S32)settings["version"].asInteger(); - LLSD overrides = settings["overrides"]; - LLSD::map_iterator sd_it = overrides.beginMap(); - LLSD::map_iterator sd_end = overrides.endMap(); - for( ; sd_it != sd_end; sd_it++) - { - if(sd_it->first == "stands") - for(LLSD::array_iterator itr = sd_it->second.beginArray(); - itr != sd_it->second.endArray(); ++itr) - { - //list of listness - if(itr->asUUID().notNull()) - mStandOverrides.push_back(itr->asUUID()); - } - // ignore if override is null key... - if(sd_it->second.asUUID().isNull() - // don't allow override to be used as a trigger - || mOverrides.find(sd_it->second.asUUID()) != mOverrides.end()) - continue; - else if(LLAO::isStand(LLUUID(sd_it->first))) - //list of listness - mStandOverrides.push_back(sd_it->second.asUUID()); - else - //add to the list - mOverrides[LLUUID(sd_it->first)] = sd_it->second.asUUID(); - } + mAnimationOverrides = settings["overrides"]; + llinfos << "Stand count: " << mAnimationOverrides["Stands"].size() << llendl; } -//static +//static ------------- Floater void LLFloaterAO::show() { if(sInstance) @@ -236,191 +314,162 @@ LLFloaterAO::~LLFloaterAO() BOOL LLFloaterAO::postBuild(void) { + LLComboBox* combo; + LLScrollListCtrl* list; + childSetAction("btn_save", onClickSave, this); childSetAction("btn_load", onClickLoad, this); - childSetCommitCallback("line_walking", onCommitAnim, this); - childSetCommitCallback("line_running", onCommitAnim, this); - childSetCommitCallback("line_crouchwalk", onCommitAnim, this); - childSetCommitCallback("line_flying", onCommitAnim, this); - childSetCommitCallback("line_turn_left", onCommitAnim, this); - childSetCommitCallback("line_turn_right", onCommitAnim, this); - childSetCommitCallback("line_jumping", onCommitAnim, this); - childSetCommitCallback("line_fly_up", onCommitAnim, this); - childSetCommitCallback("line_crouching", onCommitAnim, this); - childSetCommitCallback("line_fly_down", onCommitAnim, this); - LLComboBox* combo = getChild( "combo_stands"); - combo->setAllowTextEntry(TRUE,36,TRUE); - combo->setCommitCallback(onCommitStands); + combo = getChild( "combo_anim_type"); + combo->setCommitCallback(onCommitType); combo->setCallbackUserData(this); - mStandsCombo = combo; - childSetAction("combo_stands_add", onClickStandAdd, this); - childSetAction("combo_stands_delete", onClickStandRemove, this); - childSetCommitCallback("line_hover", onCommitAnim, this); - childSetCommitCallback("line_sitting", onCommitAnim, this); - childSetCommitCallback("line_prejump", onCommitAnim, this); - childSetCommitCallback("line_falling", onCommitAnim, this); - childSetCommitCallback("line_stride", onCommitAnim, this); - childSetCommitCallback("line_soft_landing", onCommitAnim, this); - childSetCommitCallback("line_medium_landing", onCommitAnim, this); - childSetCommitCallback("line_hard_landing", onCommitAnim, this); - childSetCommitCallback("line_flying_slow", onCommitAnim, this); - childSetCommitCallback("line_sitting_on_ground", onCommitAnim, this); - refresh(); - return TRUE; -} + combo->selectFirstItem(); + mAnimTypeCombo = combo; + mCurrentAnimType = mAnimTypeCombo->getValue(); + + combo = getChild( "combo_anim_list"); + mAnimListCombo = combo; + childSetAction("combo_anim_add", onClickAnimAdd, this); + childSetAction("combo_anim_delete", onClickAnimRemove, this); -std::string LLFloaterAO::idstr(LLUUID id) -{ - if(id.notNull()) return id.asString(); - else return ""; + list = getChild("active_anim_list"); + mAnimationList = list; + + addAnimations(); + + refresh(); + + return TRUE; } void LLFloaterAO::refresh() { - childSetText("line_walking", idstr(LLAO::mOverrides[LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0")])); - childSetText("line_running", idstr(LLAO::mOverrides[LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445")])); - childSetText("line_crouchwalk", idstr(LLAO::mOverrides[LLUUID("47f5f6fb-22e5-ae44-f871-73aaaf4a6022")])); - childSetText("line_flying", idstr(LLAO::mOverrides[LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf")])); - childSetText("line_turn_left", idstr(LLAO::mOverrides[LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135")])); - childSetText("line_turn_right", idstr(LLAO::mOverrides[LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30")])); - childSetText("line_jumping", idstr(LLAO::mOverrides[LLUUID("2305bd75-1ca9-b03b-1faa-b176b8a8c49e")])); - childSetText("line_fly_up", idstr(LLAO::mOverrides[LLUUID("62c5de58-cb33-5743-3d07-9e4cd4352864")])); - childSetText("line_crouching", idstr(LLAO::mOverrides[LLUUID("201f3fdf-cb1f-dbec-201f-7333e328ae7c")])); - childSetText("line_fly_down", idstr(LLAO::mOverrides[LLUUID("20f063ea-8306-2562-0b07-5c853b37b31e")])); - mStandsCombo->clearRows(); - for(std::list::iterator itr = LLAO::mStandOverrides.begin();itr != LLAO::mStandOverrides.end(); - itr++) + mAnimationList->deleteAllItems(); + S32 count = LLAO::mAnimationOverrides[mCurrentAnimType].size(); + llinfos << "Refreshed, building animation list for " << mCurrentAnimType << ", Count:" << count << llendl; + int i; + for(i = 0; i < count; i++) { - mStandsCombo->add((*itr).asString()); + std::string name = LLAO::mAnimationOverrides[mCurrentAnimType][i].asString(); + llinfos << "Adding " << name << llendl; + mAnimationList->addSimpleElement(name, ADD_BOTTOM); } - mStandsCombo->setSimple(LLStringExplicit(LLAO::mStandOverrides.back().asString())); - childSetText("line_hover", idstr(LLAO::mOverrides[LLUUID("4ae8016b-31b9-03bb-c401-b1ea941db41d")])); - childSetText("line_sitting", idstr(LLAO::mOverrides[LLUUID("1a5fe8ac-a804-8a5d-7cbd-56bd83184568")])); - childSetText("line_prejump", idstr(LLAO::mOverrides[LLUUID("7a4e87fe-de39-6fcb-6223-024b00893244")])); - childSetText("line_falling", idstr(LLAO::mOverrides[LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094")])); - childSetText("line_stride", idstr(LLAO::mOverrides[LLUUID("1cb562b0-ba21-2202-efb3-30f82cdf9595")])); - childSetText("line_soft_landing", idstr(LLAO::mOverrides[LLUUID("7a17b059-12b2-41b1-570a-186368b6aa6f")])); - childSetText("line_medium_landing", idstr(LLAO::mOverrides[LLUUID("f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57")])); - childSetText("line_hard_landing", idstr(LLAO::mOverrides[LLUUID("3da1d753-028a-5446-24f3-9c9b856d9422")])); - childSetText("line_flying_slow", idstr(LLAO::mOverrides[LLUUID("2b5a38b2-5e00-3a97-a495-4c826bc443e6")])); - childSetText("line_sitting_on_ground", idstr(LLAO::mOverrides[LLUUID("1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e")])); } // static -void LLFloaterAO::onCommitStands(LLUICtrl* ctrl, void* user_data) +void LLFloaterAO::onCommitType(LLUICtrl* ctrl, void* user_data) { - //LLFloaterAO* floater = (LLFloaterAO*)user_data; - LLUUID id = ctrl->getValue().asUUID(); - std::list::iterator itr = std::find(LLAO::mStandOverrides.begin(),LLAO::mStandOverrides.end(),id); - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if(id.notNull() && itr != LLAO::mStandOverrides.end()) - { - //back is always last played - avatarp->stopMotion(LLAO::mStandOverrides.back()); - avatarp->startMotion(id); - LLAO::mStandOverrides.push_back(id); - LLAO::mStandOverrides.erase(itr); - - LLAO::mTimer->reset(); - } - onCommitAnim(NULL,user_data); + LLFloaterAO* floater = (LLFloaterAO*)user_data; + floater->mCurrentAnimType = floater->mAnimTypeCombo->getValue(); + floater->refresh(); } + +void LLFloaterAO::addAnimations() +{ + mAnimListCombo->removeall(); + + std::string none_text = getString("none_text"); + mAnimListCombo->add(none_text, LLUUID::null); + + // Add all the default (legacy) animations + S32 i; + + // Get all inventory items that are animations + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + LLIsTypeWithPermissions is_copyable_animation(LLAssetType::AT_ANIMATION, + PERM_NONE, + gAgent.getID(), + gAgent.getGroupID()); + gInventory.collectDescendentsIf(gAgent.getInventoryRootID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_copyable_animation); + + // Copy into something we can sort + std::vector animations; + + S32 count = items.count(); + for(i = 0; i < count; ++i) + { + animations.push_back( items.get(i) ); + } + + // Do the sort + std::sort(animations.begin(), animations.end(), SortItemPtrsByName()); + + // And load up the combobox + std::vector::iterator it; + for (it = animations.begin(); it != animations.end(); ++it) + { + LLInventoryItem* item = *it; + mAnimListCombo->add(item->getName(), item->getAssetUUID(), ADD_BOTTOM); + } +} + // static void LLFloaterAO::onCommitAnim(LLUICtrl* ctrl, void* user_data) { LLFloaterAO* floater = (LLFloaterAO*)user_data; - - LLSD overrides; - LLUUID id; - id = LLUUID(floater->childGetValue("line_walking").asString()); - if(id.notNull()) overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"] = id; - id = LLUUID(floater->childGetValue("line_running").asString()); - if(id.notNull()) overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"] = id; - id = LLUUID(floater->childGetValue("line_crouchwalk").asString()); - if(id.notNull()) overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"] = id; - id = LLUUID(floater->childGetValue("line_flying").asString()); - if(id.notNull()) overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"] = id; - id = LLUUID(floater->childGetValue("line_turn_left").asString()); - if(id.notNull()) overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"] = id; - id = LLUUID(floater->childGetValue("line_turn_right").asString()); - if(id.notNull()) overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"] = id; - id = LLUUID(floater->childGetValue("line_jumping").asString()); - if(id.notNull()) overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"] = id; - id = LLUUID(floater->childGetValue("line_fly_up").asString()); - if(id.notNull()) overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"] = id; - id = LLUUID(floater->childGetValue("line_crouching").asString()); - if(id.notNull()) overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"] = id; - id = LLUUID(floater->childGetValue("line_fly_down").asString()); - if(id.notNull()) overrides["20f063ea-8306-2562-0b07-5c853b37b31e"] = id; - id = LLUUID(floater->childGetValue("line_hover").asString()); - if(id.notNull()) overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"] = id; - id = LLUUID(floater->childGetValue("line_sitting").asString()); - if(id.notNull()) overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"] = id; - id = LLUUID(floater->childGetValue("line_prejump").asString()); - if(id.notNull()) overrides["7a4e87fe-de39-6fcb-6223-024b00893244"] = id; - id = LLUUID(floater->childGetValue("line_falling").asString()); - if(id.notNull()) overrides["666307d9-a860-572d-6fd4-c3ab8865c094"] = id; - id = LLUUID(floater->childGetValue("line_stride").asString()); - if(id.notNull()) overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"] = id; - id = LLUUID(floater->childGetValue("line_soft_landing").asString()); - if(id.notNull()) overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"] = id; - id = LLUUID(floater->childGetValue("line_medium_landing").asString()); - if(id.notNull()) overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"] = id; - id = LLUUID(floater->childGetValue("line_hard_landing").asString()); - if(id.notNull()) overrides["3da1d753-028a-5446-24f3-9c9b856d9422"] = id; - id = LLUUID(floater->childGetValue("line_flying_slow").asString()); - if(id.notNull()) overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"] = id; - id = LLUUID(floater->childGetValue("line_sitting_on_ground").asString()); - if(id.notNull()) overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"] = id; - for(std::list::iterator itr = LLAO::mStandOverrides.begin();itr != LLAO::mStandOverrides.end(); - itr++) - { - overrides["stands"].append((*itr)); - } LLSD settings; settings["version"] = 2; - settings["overrides"] = overrides; + settings["overrides"] = LLAO::mAnimationOverrides; gSavedPerAccountSettings.setLLSD("AO.Settings", settings); LLAO::refresh(); floater->refresh(); } + //static -void LLFloaterAO::onClickStandRemove(void* user_data) +void LLFloaterAO::onClickAnimRemove(void* user_data) { LLFloaterAO* floater = (LLFloaterAO*)user_data; - LLUUID id = floater->mStandsCombo->getValue().asUUID(); - std::list::iterator itr = std::find(LLAO::mStandOverrides.begin(),LLAO::mStandOverrides.end(),id); - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if(id.notNull() && itr != LLAO::mStandOverrides.end()) + std::vector items = floater->mAnimationList->getAllSelected(); + for (std::vector::iterator iter = items.begin(); iter != items.end(); ++iter) { - //back is always last played, front is next - avatarp->stopMotion(id); - LLAO::mStandOverrides.erase(itr); - avatarp->startMotion(LLAO::mStandOverrides.front()); - LLAO::mStandOverrides.push_back(LLAO::mStandOverrides.front()); - LLAO::mStandOverrides.pop_front(); - - floater->refresh(); - LLAO::mTimer->reset(); + LLScrollListItem* item = *iter; + if (item->getValue().asString() != "") + { + std::string anim_name = item->getValue().asString(); + S32 count = LLAO::mAnimationOverrides[floater->mCurrentAnimType].size(); + S32 index; + LLSD new_list; + for (index = 0; index < count; index++) + { + if (LLAO::mAnimationOverrides[floater->mCurrentAnimType][index].isDefined()) + { + std::string this_anim = LLAO::mAnimationOverrides[floater->mCurrentAnimType][index].asString(); + if (this_anim != anim_name) + { + new_list.append(this_anim); + } + } + } + LLAO::mAnimationOverrides[floater->mCurrentAnimType] = new_list; + } } onCommitAnim(NULL,user_data); } //static -void LLFloaterAO::onClickStandAdd(void* user_data) +void LLFloaterAO::onClickAnimAdd(void* user_data) { LLFloaterAO* floater = (LLFloaterAO*)user_data; - LLUUID id = floater->mStandsCombo->getValue().asUUID(); - std::list::iterator itr = std::find(LLAO::mStandOverrides.begin(),LLAO::mStandOverrides.end(),id); - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if(id.notNull() && itr == LLAO::mStandOverrides.end()) + std::string anim_name = floater->mAnimListCombo->getSimple(); + if (anim_name == "") + return; + LLUUID id(LLAO::getAssetIDByName(anim_name)); +#ifdef AO_DEBUG + llinfos << "Attempting to add " << anim_name << " (" << id << ") " << " to " << floater->mCurrentAnimType << llendl; +#endif + if(id.notNull() && !LLAO::mAnimationOverrides[floater->mCurrentAnimType].has(anim_name)) { - //back is always last played - avatarp->stopMotion(LLAO::mStandOverrides.back()); - avatarp->startMotion(id); - LLAO::mStandOverrides.push_back(id); - - floater->refresh(); +#ifdef AO_DEBUG + llinfos << "Actually adding animation, this should be refreshed. Count:" << LLAO::mAnimationOverrides[floater->mCurrentAnimType].size() << llendl; +#endif + LLAO::mAnimationOverrides[floater->mCurrentAnimType].append(anim_name); +#ifdef AO_DEBUG + llinfos << "Added animation. Count:" << LLAO::mAnimationOverrides[floater->mCurrentAnimType].size() << llendl; +#endif LLAO::mTimer->reset(); } onCommitAnim(NULL,user_data); @@ -466,5 +515,4 @@ void LLFloaterAO::onClickLoad(void* user_data) xml_file.close(); } } - -// +// \ No newline at end of file diff --git a/indra/newview/llao.h b/indra/newview/llao.h index 96d33adbf..4672a257e 100644 --- a/indra/newview/llao.h +++ b/indra/newview/llao.h @@ -16,6 +16,7 @@ public: void pause(); void resume(); void reset(); + private: BOOL mPaused; }; @@ -25,14 +26,30 @@ class LLAO public: static void setup(); static std::map mOverrides; - static std::list mStandOverrides; + static std::list mStandOverrides; + //Animation LLSD for full animation options -HgB + static LLSD mAnimationOverrides; + static S32 mAnimationIndex; + static BOOL isEnabled(){ return mEnabled; } static BOOL isStand(LLUUID _id); + static BOOL isVoice(LLUUID _id); static void refresh(); static void runAnims(BOOL enabled); static bool handleAOEnabledChanged(const LLSD& newvalue); static bool handleAOPeriodChanged(const LLSD& newvalue); + static const LLUUID& getAssetIDByName(const std::string& name); + static LLUUID getFrontUUID(); + static LLUUID getBackUUID(); static LLAOStandTimer* mTimer; + + //Horribly hacked-up stuff from llpreviewgesture.h, try to fix in the near future. -HgB + /*virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg);*/ + private: static BOOL mEnabled; static F32 mPeriod; @@ -44,19 +61,24 @@ public: static LLFloaterAO* sInstance; static void show(); LLFloaterAO(); + void addAnimations(); BOOL postBuild(void); void refresh(); static void onCommitAnim(LLUICtrl* ctrl, void* user_data); - static void onCommitStands(LLUICtrl* ctrl,void* user_data); - static void onClickStandRemove(void* user_data); - static void onClickStandAdd(void* user_data); + static void onCommitType(LLUICtrl* ctrl,void* user_data); + static void onClickAnimRemove(void* user_data); + static void onClickAnimAdd(void* user_data); static void onClickSave(void* user_data); static void onClickLoad(void* user_data); + private: + LLComboBox* mAnimListCombo; + LLComboBox* mAnimTypeCombo; + LLScrollListCtrl* mAnimationList; + std::string mCurrentAnimType; virtual ~LLFloaterAO(); - std::string idstr(LLUUID id); // silly utility -public: - LLComboBox* mStandsCombo; +protected: + static void onCommitAnimation(LLUICtrl* ctrl, void* data); }; #endif diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 649addfc1..8802643b9 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -44,6 +44,7 @@ #include "lluserauth.h" #include "llagent.h" +#include "llavatarconstants.h" //For new Online check - HgB #include "llfloateravatarpicker.h" #include "llbutton.h" #include "llcheckboxctrl.h" @@ -1477,7 +1478,8 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo BOOL is_group_owned; S32 object_count; U32 most_recent_time = 0; - BOOL is_online; + BOOL is_online = 0; + U32 flags = 0x0; std::string object_count_str; //BOOL b_need_refresh = FALSE; @@ -1492,13 +1494,16 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo std::vector avatar_ids; std::vector positions; LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, F32_MAX); - + for(S32 i = 0; i < rows; ++i) { msg->getUUIDFast(_PREHASH_Data, _PREHASH_OwnerID, owner_id, i); msg->getBOOLFast(_PREHASH_Data, _PREHASH_IsGroupOwned, is_group_owned, i); msg->getS32Fast (_PREHASH_Data, _PREHASH_Count, object_count, i); - msg->getBOOLFast(_PREHASH_Data, _PREHASH_OnlineStatus, is_online, i); + //Trying a different approach to getting the Online flag. -HgB + //msg->getBOOLFast(_PREHASH_Data, _PREHASH_OnlineStatus, is_online, i); + msg->getU32Fast(_PREHASH_PropertiesData, _PREHASH_Flags, flags); + is_online = (flags & AVATAR_ONLINE); if(msg->has("DataExtended")) { msg->getU32("DataExtended", "TimeStamp", most_recent_time, i); diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index b5f87f08c..9c3d07a45 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -229,9 +229,6 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, if (item && gInventory.getItem(item->getUUID())) { - // - /* - // LLPermissions perm = item->getPermissions(); if (!((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)) { @@ -245,10 +242,6 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, break; } else if (drop) - // - */ - if(drop) - // { LLScrollListItem* line = NULL; if (cargo_type == DAD_ANIMATION) @@ -628,10 +621,7 @@ void LLPreviewGesture::addAnimations() LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLIsTypeWithPermissions is_copyable_animation(LLAssetType::AT_ANIMATION, - // - // PERM_ITEM_UNRESTRICTED, - PERM_NONE, - // + PERM_ITEM_UNRESTRICTED, gAgent.getID(), gAgent.getGroupID()); gInventory.collectDescendentsIf(gAgent.getInventoryRootID(), diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8feb60628..3d3ae1969 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1393,6 +1393,9 @@ bool idle_startup() // Overwrite default user settings with user settings LLAppViewer::instance()->loadSettingsFromDirectory("Account"); + //User settings are loaded, get the AO settings - HgB + LLAO::refresh(); + // Need to set the LastLogoff time here if we don't have one. LastLogoff is used for "Recent Items" calculation // and startup time is close enough if we don't have a real value. if (gSavedPerAccountSettings.getU32("LastLogoff") == 0) @@ -1430,7 +1433,6 @@ bool idle_startup() LLFile::mkdir(user_windlight_days_path_name.c_str()); // - LLAO::refresh(); LLFloaterBlacklist::loadFromSave(); // diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 1b52a1925..f6ff2e99e 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1062,6 +1062,13 @@ void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry) if (!mReadOnly) { entry.mTime = time(NULL); + if(entry.mImageSize < entry.mBodySize) + { + // Just say no, due to my messing around to cache discards other than 0 we can end up here + // after recalling an image from cache at a lower discard than cached. RC + return; + } + llassert_always(entry.mImageSize == 0 || entry.mImageSize == -1 || entry.mImageSize > entry.mBodySize); if (entry.mBodySize > 0) { diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 329112172..a18d7d989 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -160,7 +160,7 @@ public: //static void onBtnRevert( void* userdata ); static void onBtnWhite( void* userdata ); static void onBtnInvisible( void* userdata ); - static void onBtnNone( void* userdata ); + static void onBtnAlpha( void* userdata ); static void onBtnClear( void* userdata ); static void onSelectionChange(const std::deque &items, BOOL user_action, void* data); static void onShowFolders(LLUICtrl* ctrl, void* userdata); @@ -178,6 +178,7 @@ protected: LLUUID mWhiteImageAssetID; LLUUID mInvisibleImageAssetID; LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory. + LLUUID mAlphaImageAssetID; LLUUID mOriginalImageAssetID; std::string mLabel; @@ -218,6 +219,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mFallbackImageName( fallback_image_name ), mWhiteImageAssetID( gSavedSettings.getString( "UIImgWhiteUUID" ) ), mInvisibleImageAssetID(gSavedSettings.getString("UIImgInvisibleUUID")), + mAlphaImageAssetID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"), mOriginalImageAssetID(owner->getImageAssetID()), mLabel(label), mTentativeLabel(NULL), @@ -237,7 +239,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this); - childSetAction("None", LLFloaterTexturePicker::onBtnNone,this); + childSetAction("Alpha", LLFloaterTexturePicker::onBtnAlpha,this); childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this); childSetAction("Invisible", LLFloaterTexturePicker::onBtnInvisible,this); @@ -590,7 +592,7 @@ void LLFloaterTexturePicker::draw() childSetEnabled("Default", mImageAssetID != mOwner->getDefaultImageAssetID()); childSetEnabled("Blank", mImageAssetID != mWhiteImageAssetID ); childSetEnabled("Invisible", mOwner->getAllowInvisibleTexture() && mImageAssetID != mInvisibleImageAssetID ); - childSetEnabled("None", mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); + childSetEnabled("Alpha", mImageAssetID != mAlphaImageAssetID ); LLFloater::draw(); @@ -734,10 +736,10 @@ void LLFloaterTexturePicker::onBtnInvisible(void* userdata) // static -void LLFloaterTexturePicker::onBtnNone(void* userdata) +void LLFloaterTexturePicker::onBtnAlpha(void* userdata) { LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; - self->setImageID( LLUUID::null ); + self->setImageID(self->mAlphaImageAssetID); self->commitIfImmediateSet(); } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index d37362715..d0e0f1b7c 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -192,11 +192,9 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) // touch behavior down below... break; case CLICK_ACTION_SIT: - if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting + if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting) + && (!gSavedSettings.getBOOL("DisableClickSit"))) // agent not already sitting { - // - if(!gSavedSettings.getBOOL("DisableClickSit")) - // handle_sit_or_stand(); // put focus in world when sitting on an object gFocusMgr.setKeyboardFocus(NULL); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9d84f1403..b1913b3dc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -247,7 +247,6 @@ #include "llao.h" #include "llfloatervfs.h" #include "llfloatervfsexplorer.h" -#include "llfloaterexportregion.h" // #include "scriptcounter.h" @@ -2947,6 +2946,21 @@ class LLAvatarCopyUUID : public view_listener_t } }; +class LLAvatarClientUUID : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); + if(!avatar) return true; + + std::string clientID; + LLColor4 color; + avatar->getClientInfo(clientID, color, false); + gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(clientID)); + return true; + } +}; + class LLAvatarEnableFreezeEject : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9789,6 +9803,7 @@ void initialize_menus() addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject"); addMenu(new LLAvatarCopyUUID(), "Avatar.CopyUUID"); + addMenu(new LLAvatarClientUUID(), "Avatar.ClientID"); // Object pie menu addMenu(new LLObjectOpen(), "Object.Open"); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 661a3fbee..d5bd6788b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3246,7 +3246,7 @@ void LLVOAvatar::idleUpdateWindEffect() bool LLVOAvatar::updateClientTags() { std::string client_list_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "client_definitions.xml"); - LLSD response = LLHTTPClient::blockingGet("http://ascent.balseraph.org/updates/client_definitions.xml"); + LLSD response = LLHTTPClient::blockingGet("http://ascentviewer.com/updates/client_definitions.xml"); if(response.has("body")) { const LLSD &client_list = response["body"]; @@ -5698,13 +5698,37 @@ std::string LLVOAvatar::getIdleTime() BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { LLMemType mt(LLMemType::MTYPE_AVATAR); - // if(mIsSelf) { if(LLAO::isEnabled()) { - if(LLAO::mOverrides.find(id) != LLAO::mOverrides.end()) + std::string ao_id; + if (LLAO::isStand(id)) + { + ao_id = "Stands"; + } + else if (LLAO::isVoice(id)) + { + ao_id = "Voices"; + } + else + { + ao_id = id.asString(); + } + if (LLAO::mAnimationOverrides[ao_id].size() > 0) + { + LLAO::mAnimationIndex++; + if (LLAO::mAnimationOverrides[ao_id].size() <= LLAO::mAnimationIndex) + { + LLAO::mAnimationIndex = 0; + } + LLUUID new_anim = LLAO::getAssetIDByName(LLAO::mAnimationOverrides[ao_id][LLAO::mAnimationIndex]); + llinfos << "Switching to anim #" << LLAO::mAnimationIndex << ": " << LLAO::mAnimationOverrides[ao_id][LLAO::mAnimationIndex] << llendl; + gAgent.sendAnimationRequest(new_anim, ANIM_REQUEST_START); + startMotion(new_anim, time_offset); + } + /*if(LLAO::mOverrides.find(id) != LLAO::mOverrides.end()) { // avoid infinite loops! if( (id != LLAO::mOverrides[id]) @@ -5714,7 +5738,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) gAgent.sendAnimationRequest(LLAO::mOverrides[id], ANIM_REQUEST_START); startMotion(LLAO::mOverrides[id], time_offset); } - } + }*/ } } // @@ -5777,15 +5801,35 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { if (mIsSelf) { + // if(LLAO::isEnabled()) { - if( (LLAO::mOverrides.find(id) != LLAO::mOverrides.end()) + std::string ao_id; + if (LLAO::isStand(id)) + { + ao_id = "Stands"; + } + else if (LLAO::isVoice(id)) + { + ao_id = "Voices"; + } + else + { + ao_id = id.asString(); + } + if (LLAO::mAnimationOverrides[ao_id].size() > 0) + { + LLUUID new_anim = LLAO::getAssetIDByName(LLAO::mAnimationOverrides[ao_id][LLAO::mAnimationIndex]); + gAgent.sendAnimationRequest(new_anim, ANIM_REQUEST_STOP); + stopMotion(new_anim, stop_immediate); + } + /*if( (LLAO::mOverrides.find(id) != LLAO::mOverrides.end()) && (id != LLAO::mOverrides[id]) ) { gAgent.sendAnimationRequest(LLAO::mOverrides[id], ANIM_REQUEST_STOP); stopMotion(LLAO::mOverrides[id], stop_immediate); - } + }*/ } // gAgent.onAnimStop(id); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index c849ec428..0f5cc88ad 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -60,7 +60,7 @@ - + diff --git a/indra/newview/skins/default/xui/en-us/floater_ao.xml b/indra/newview/skins/default/xui/en-us/floater_ao.xml index f300a51bf..71c808fdf 100755 --- a/indra/newview/skins/default/xui/en-us/floater_ao.xml +++ b/indra/newview/skins/default/xui/en-us/floater_ao.xml @@ -1,114 +1,101 @@ - -