summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/llaudiosourcevo.cpp98
-rw-r--r--indra/newview/llaudiosourcevo.h4
-rw-r--r--indra/newview/llconversationview.cpp2
-rw-r--r--indra/newview/llfloatermodelpreview.cpp29
-rw-r--r--indra/newview/llfloatermodelpreview.h4
-rw-r--r--indra/newview/llfloatermodeluploadbase.h2
-rw-r--r--indra/newview/llimprocessing.cpp16
-rw-r--r--indra/newview/llinventorybridge.cpp7
-rw-r--r--indra/newview/lllocationinputctrl.cpp4
-rw-r--r--indra/newview/llmarketplacefunctions.cpp5
-rw-r--r--indra/newview/llmarketplacefunctions.h4
-rw-r--r--indra/newview/llmeshrepository.cpp4
-rw-r--r--indra/newview/llnetmap.cpp2
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp4
-rw-r--r--indra/newview/llpanellogin.cpp11
-rw-r--r--indra/newview/llpanelvolume.cpp20
-rw-r--r--indra/newview/llpreviewnotecard.cpp6
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp40
-rw-r--r--indra/newview/lluploadfloaterobservers.h2
-rw-r--r--indra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/llviewerobject.cpp7
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerwindow.cpp3
-rw-r--r--indra/newview/llvoavatar.cpp10
-rw-r--r--indra/newview/llworldmapview.cpp2
26 files changed, 207 insertions, 88 deletions
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index c44315e3f0..a7ee22c2e2 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.3.7
+6.3.8
diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp
index b37aba6c15..4b6c855bde 100644
--- a/indra/newview/llaudiosourcevo.cpp
+++ b/indra/newview/llaudiosourcevo.cpp
@@ -29,8 +29,10 @@
#include "llaudiosourcevo.h"
+#include "llagent.h"
#include "llagentcamera.h"
#include "llmutelist.h"
+#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp)
@@ -54,6 +56,79 @@ void LLAudioSourceVO::setGain(const F32 gain)
mGain = llclamp(gain, 0.f, 1.f);
}
+void LLAudioSourceVO::checkCutOffRadius()
+{
+ if (mSourceMuted // already muted by something, will be recalculated on update()
+ || !mObjectp)
+ {
+ return;
+ }
+
+ F32 cutoff = mObjectp->getSoundCutOffRadius();
+ if (cutoff < 0.1f)
+ {
+ // consider cutoff below 0.1m as off (to avoid near zero comparison)
+ return;
+ }
+
+ LLVector3d pos_global = getPosGlobal();
+ if (!isInCutOffRadius(pos_global, cutoff))
+ {
+ mSourceMuted = true;
+ }
+}
+
+LLVector3d LLAudioSourceVO::getPosGlobal() const
+{
+ if (mObjectp->isAttachment())
+ {
+ LLViewerObject* parent = mObjectp;
+ while (parent && !parent->isAvatar())
+ {
+ parent = (LLViewerObject*)parent->getParent();
+ }
+ if (parent)
+ {
+ return parent->getPositionGlobal();
+ }
+ }
+ else
+ {
+ return mObjectp->getPositionGlobal();
+ }
+ return LLVector3d();
+}
+
+bool LLAudioSourceVO::isInCutOffRadius(const LLVector3d pos_global, const F32 cutoff) const
+{
+ static LLCachedControl<S32> ear_mode(gSavedSettings, "VoiceEarLocation", 0);
+
+ LLVector3d pos_ear;
+
+ switch (ear_mode())
+ {
+ case 0: // camera
+ pos_ear = gAgentCamera.getCameraPositionGlobal();
+ break;
+
+ case 1: // avatar
+ case 2:
+ // voice support 'mixed' in '2' case with agent's position and camera's rotations
+ // but it is not defined in settings and uses camera as default
+ pos_ear = gAgent.getPositionGlobal();
+ break;
+
+ default:
+ pos_ear = gAgentCamera.getCameraPositionGlobal();
+ break;
+ }
+ LLVector3d to_vec = pos_global - pos_ear;
+
+ F32 dist = (F32)to_vec.magVec();
+
+ return dist < cutoff;
+}
+
void LLAudioSourceVO::updateMute()
{
if (!mObjectp || mObjectp->isDead())
@@ -63,26 +138,11 @@ void LLAudioSourceVO::updateMute()
}
bool mute = false;
- LLVector3d pos_global;
-
- if (mObjectp->isAttachment())
- {
- LLViewerObject* parent = mObjectp;
- while (parent && !parent->isAvatar())
- {
- parent = (LLViewerObject*)parent->getParent();
- }
- if (parent)
- {
- pos_global = parent->getPositionGlobal();
- }
- }
- else
- {
- pos_global = mObjectp->getPositionGlobal();
- }
+ LLVector3d pos_global = getPosGlobal();
- if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
+ F32 cutoff = mObjectp->getSoundCutOffRadius();
+ if ((cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff)) // consider cutoff below 0.1m as off
+ || !LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
{
mute = true;
}
diff --git a/indra/newview/llaudiosourcevo.h b/indra/newview/llaudiosourcevo.h
index f1d8ef4528..672a07f7d3 100644
--- a/indra/newview/llaudiosourcevo.h
+++ b/indra/newview/llaudiosourcevo.h
@@ -41,7 +41,11 @@ public:
/*virtual*/ void update();
/*virtual*/ void setGain(const F32 gain);
+ void checkCutOffRadius();
+
private:
+ LLVector3d getPosGlobal() const;
+ bool isInCutOffRadius(LLVector3d pos_global, const F32 cutoff) const;
void updateMute();
private:
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 0075b62100..60a5204547 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -175,7 +175,7 @@ BOOL LLConversationViewSession::postBuild()
LLAvatarIconCtrl* icon = mItemPanel->getChild<LLAvatarIconCtrl>("avatar_icon");
icon->setVisible(true);
icon->setValue(session->mOtherParticipantID);
- mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true);
+ mSpeakingIndicator->setSpeakerId(session->mOtherParticipantID, session->mSessionID, true);
mHasArrow = false;
}
break;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index c4186132fe..e12ad262f8 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -433,7 +433,7 @@ void LLFloaterModelPreview::initModelPreview()
mModelPreview = new LLModelPreview(512, 512, this );
mModelPreview->setPreviewTarget(16.f);
mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5));
- mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1));
+ mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::modelUpdated, this, _1));
}
void LLFloaterModelPreview::onViewOptionChecked(LLUICtrl* ctrl)
@@ -510,7 +510,8 @@ void LLFloaterModelPreview::onClickCalculateBtn()
mModelPreview->getPreviewAvatar()->showAttachmentOverrides();
}
- mUploadModelUrl.clear();
+ mUploadModelUrl.clear();
+ mModelPhysicsFee.clear();
gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
childGetValue("upload_textures").asBoolean(),
@@ -4439,6 +4440,12 @@ void LLFloaterModelPreview::toggleCalculateButton()
toggleCalculateButton(true);
}
+void LLFloaterModelPreview::modelUpdated(bool calculate_visible)
+{
+ mModelPhysicsFee.clear();
+ toggleCalculateButton(calculate_visible);
+}
+
void LLFloaterModelPreview::toggleCalculateButton(bool visible)
{
mCalculateBtn->setVisible(visible);
@@ -4464,7 +4471,10 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
childSetTextArg("download_weight", "[ST]", tbd);
childSetTextArg("server_weight", "[SIM]", tbd);
childSetTextArg("physics_weight", "[PH]", tbd);
- childSetTextArg("upload_fee", "[FEE]", tbd);
+ if (!mModelPhysicsFee.isMap() || mModelPhysicsFee.emptyMap())
+ {
+ childSetTextArg("upload_fee", "[FEE]", tbd);
+ }
childSetTextArg("price_breakdown", "[STREAMING]", tbd);
childSetTextArg("price_breakdown", "[PHYSICS]", tbd);
childSetTextArg("price_breakdown", "[INSTANCES]", tbd);
@@ -4524,10 +4534,21 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived()
mUploadBtn->setEnabled(isModelUploadAllowed());
}
-void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason)
+void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result)
{
LL_WARNS() << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << LL_ENDL;
doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true));
+
+ if (result.has("upload_price"))
+ {
+ mModelPhysicsFee = result;
+ childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger()));
+ childSetVisible("upload_fee", true);
+ }
+ else
+ {
+ mModelPhysicsFee.clear();
+ }
}
/*virtual*/
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index edc90d1695..1c66570650 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -125,7 +125,7 @@ public:
/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
void handleModelPhysicsFeeReceived();
- /*virtual*/ void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason);
+ /*virtual*/ void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result);
/*virtual*/ void onModelUploadSuccess();
@@ -208,6 +208,8 @@ private:
void onLoDSourceCommit(S32 lod);
+ void modelUpdated(bool calculate_visible);
+
// Toggles between "Calculate weights & fee" and "Upload" buttons.
void toggleCalculateButton(bool visible);
diff --git a/indra/newview/llfloatermodeluploadbase.h b/indra/newview/llfloatermodeluploadbase.h
index 0d4c834122..721fce059e 100644
--- a/indra/newview/llfloatermodeluploadbase.h
+++ b/indra/newview/llfloatermodeluploadbase.h
@@ -45,7 +45,7 @@ public:
virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
- virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) = 0;
+ virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result) = 0;
virtual void onModelUploadSuccess() {};
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 61c8a3a898..c3375a3779 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -62,6 +62,8 @@
#pragma warning (disable:4702)
#endif
+extern void on_new_message(const LLSD& msg);
+
// Strip out "Resident" for display, but only if the message came from a user
// (rather than a script)
static std::string clean_name_from_im(const std::string& name, EInstantMessage type)
@@ -1028,6 +1030,14 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args);
+ if (message != "")
+ {
+ LLSD msg_notify;
+ msg_notify["session_id"] = LLUUID();
+ msg_notify["from_id"] = chat.mFromID;
+ msg_notify["source_type"] = chat.mSourceType;
+ on_new_message(msg_notify);
+ }
}
@@ -1559,6 +1569,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
return;
}
+ if (gAgent.getRegion() == NULL)
+ {
+ LL_WARNS("Messaging") << "Region null while attempting to load messages." << LL_ENDL;
+ return;
+ }
+
LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL;
std::vector<U8> data;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 6d2d533c9d..36784ce3f9 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2270,7 +2270,7 @@ public:
// Can be destroyed (or moved to trash)
BOOL LLFolderBridge::isItemRemovable() const
{
- if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder())
+ if (!get_is_category_removable(getInventoryModel(), mUUID))
{
return FALSE;
}
@@ -2287,6 +2287,11 @@ BOOL LLFolderBridge::isItemRemovable() const
}
}
+ if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID)))
+ {
+ return FALSE;
+ }
+
return TRUE;
}
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 42b5ff3890..802e4941e6 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -1100,9 +1100,7 @@ void LLLocationInputCtrl::changeLocationPresentation()
//change location presentation only if user does not select/paste anything and
//human-readable region name is being displayed
- std::string text = mTextEntry->getText();
- LLStringUtil::trim(text);
- if(!mTextEntry->hasSelection() && text == mHumanReadableLocation)
+ if(!mTextEntry->hasSelection() && mTextEntry->getText() == mHumanReadableLocation)
{
//needs unescaped one
LLSLURL slurl;
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 805c25508f..aa0c7fb73b 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1294,6 +1294,11 @@ void LLMarketplaceData::setSLMDataFetched(U32 status)
}
}
+bool LLMarketplaceData::isSLMDataFetched()
+{
+ return mMarketPlaceDataFetched == MarketplaceFetchCodes::MARKET_FETCH_DONE;
+}
+
// Creation / Deletion / Update
// Methods publicly called
bool LLMarketplaceData::createListing(const LLUUID& folder_id)
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index ec312baca3..fee9225f77 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -204,7 +204,9 @@ public:
void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb);
void setSLMDataFetched(U32 status);
U32 getSLMDataFetched() { return mMarketPlaceDataFetched; }
-
+
+ bool isSLMDataFetched();
+
// High level create/delete/set Marketplace data: each method returns true if the function succeeds, false if error
bool createListing(const LLUUID& folder_id);
bool activateListing(const LLUUID& folder_id, bool activate, S32 depth = -1);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 31e3d408d7..95322cce6d 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2772,7 +2772,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
if (observer)
{
- observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason);
+ observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason, body["error"]);
}
}
else
@@ -2805,7 +2805,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
if (observer)
{
- observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason);
+ observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason, body["error"]);
}
}
}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index fc1039b372..112da55682 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -354,7 +354,7 @@ void LLNetMap::draw()
LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
- unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z &&
+ unknown_relative_z = positions[i].mdV[VZ] >= COARSEUPDATE_MAX_Z &&
camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
LLWorldMapView::drawAvatar(
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 7f6c065bb9..e9fe493d7e 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -245,11 +245,11 @@ void LLOutputMonitorCtrl::draw()
// virtual
BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{
- if (mSpeakerId != gAgentID && !mShowParticipantsSpeaking)
+ if (mSpeakerId != gAgentID)
{
LLFloaterReg::showInstance("floater_voice_volume", LLSD().with("avatar_id", mSpeakerId));
}
- else if(mShowParticipantsSpeaking)
+ else if (mShowParticipantsSpeaking)
{
LLFloaterReg::showInstance("chat_voice", LLSD());
}
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 7ef3685cdb..224cec9650 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -1230,6 +1230,8 @@ void LLPanelLogin::updateLoginButtons()
if (user_combo->getCurrentIndex() != -1)
{
remember_name->setValue(true);
+ LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>("remember_password");
+ remember_pass->setEnabled(TRUE);
} // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user
}
}
@@ -1239,6 +1241,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
user_combo->removeall();
user_combo->clear();
+ user_combo->setValue(std::string());
+ getChild<LLUICtrl>("password_edit")->setValue(std::string());
mUsernameLength = 0;
mPasswordLength = 0;
@@ -1261,9 +1265,7 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
if (credential.isNull() || !user_combo->setSelectedByValue(LLSD(credential->userID()), true))
{
- // selection failed, just deselect whatever might be selected
- user_combo->setValue(std::string());
- getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ // selection failed, fields will be mepty
updateLoginButtons();
}
else
@@ -1278,7 +1280,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
const LLSD &ident = credential->getIdentifier();
if (ident.isMap() && ident.has("type"))
{
- user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE);
+ // this llsd might hold invalid credencial (failed login), so
+ // do not add to the list, just set field.
setFields(credential);
}
else
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 735eaa423d..58bc049338 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -82,8 +82,11 @@
#include <boost/bind.hpp>
-// "Features" Tab
+const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f;
+const F32 DEFAULT_DENSITY = 1000.f;
+
+// "Features" Tab
BOOL LLPanelVolume::postBuild()
{
// Flexible Objects Parameters
@@ -830,7 +833,7 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data)
// static
void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
{
- //LLPanelObject* self = (LLPanelObject*) userdata;
+ LLPanelVolume* self = (LLPanelVolume*)userdata;
LLComboBox* box = (LLComboBox*) ctrl;
if (box)
@@ -841,6 +844,19 @@ void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
if (material_name != LEGACY_FULLBRIGHT_DESC)
{
U8 material_code = LLMaterialTable::basic.getMCode(material_name);
+ if (self)
+ {
+ LLViewerObject* objectp = self->mObject;
+ if (objectp)
+ {
+ objectp->setPhysicsGravity(DEFAULT_GRAVITY_MULTIPLIER);
+ objectp->setPhysicsFriction(LLMaterialTable::basic.getFriction(material_code));
+ //currently density is always set to 1000 serverside regardless of chosen material,
+ //actual material density should be used here, if this behavior change
+ objectp->setPhysicsDensity(DEFAULT_DENSITY);
+ objectp->setPhysicsRestitution(LLMaterialTable::basic.getRestitution(material_code));
+ }
+ }
LLSelectMgr::getInstance()->selectionSetMaterial(material_code);
}
}
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 1533a27469..2f534ac245 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -367,6 +367,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
previewEditor->makePristine();
BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem());
preview->setEnabled(modifiable);
+ preview->syncExternal();
preview->mAssetStatus = PREVIEW_ASSET_LOADED;
}
else
@@ -503,10 +504,6 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync)
}
editor->makePristine();
- if (sync)
- {
- syncExternal();
- }
const LLInventoryItem* item = getItem();
// save it out to database
if (item)
@@ -755,6 +752,7 @@ void LLPreviewNotecard::openInExternalEditor()
// Start watching file changes.
mLiveFile = new LLLiveLSLFile(filename, boost::bind(&LLPreviewNotecard::onExternalChange, this, _1));
+ mLiveFile->ignoreNextUpdate();
mLiveFile->addToEventTimer();
// Open it in external editor.
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 8fef3ff1c0..b448caeb0b 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -63,6 +63,7 @@ F32 SHINE_WIDTH = 0.6f;
F32 SHINE_OPACITY = 0.3f;
F32 FALL_TIME = 0.6f;
S32 BORDER_WIDTH = 6;
+S32 TOP_PANEL_HEIGHT = 30;
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
@@ -293,8 +294,8 @@ void LLSnapshotLivePreview::draw()
F32 uv_width = isImageScaled() ? 1.f : llmin((F32)getWidth() / (F32)getCurrentImage()->getWidth(), 1.f);
F32 uv_height = isImageScaled() ? 1.f : llmin((F32)getHeight() / (F32)getCurrentImage()->getHeight(), 1.f);
gGL.pushMatrix();
- {
- gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f);
+ {
+ gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom + TOP_PANEL_HEIGHT, 0.f);
gGL.begin(LLRender::QUADS);
{
gGL.texCoord2f(uv_width, uv_height);
@@ -346,14 +347,15 @@ void LLSnapshotLivePreview::draw()
F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME);
// draw "shine" effect
- LLLocalClipRect clip(getLocalRect());
+ LLRect local_rect(0, getRect().getHeight() + TOP_PANEL_HEIGHT, getRect().getWidth(), 0);
+ LLLocalClipRect clip(local_rect);
{
// draw diagonal stripe with gradient that passes over screen
S32 x1 = gViewerWindow->getWindowWidthScaled() * ll_round((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
S32 x2 = x1 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
S32 x3 = x2 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
S32 y1 = 0;
- S32 y2 = gViewerWindow->getWindowHeightScaled();
+ S32 y2 = gViewerWindow->getWindowHeightScaled() + TOP_PANEL_HEIGHT;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.begin(LLRender::QUADS);
@@ -383,36 +385,6 @@ void LLSnapshotLivePreview::draw()
}
}
- // draw framing rectangle
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.color4f(1.f, 1.f, 1.f, 1.f);
- const LLRect& outline_rect = getImageRect();
- gGL.begin(LLRender::QUADS);
- {
- gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
- gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
- gGL.vertex2i(outline_rect.mRight, outline_rect.mTop);
- gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
-
- gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
- gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
- gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
- gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
-
- gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
- gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
- gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
- gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
-
- gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
- gGL.vertex2i(outline_rect.mRight, outline_rect.mTop);
- gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
- gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
- }
- gGL.end();
- }
-
// draw old image dropping away
if (mFallAnimTimer.getStarted())
{
diff --git a/indra/newview/lluploadfloaterobservers.h b/indra/newview/lluploadfloaterobservers.h
index 15c3dad38e..77e950a1c9 100644
--- a/indra/newview/lluploadfloaterobservers.h
+++ b/indra/newview/lluploadfloaterobservers.h
@@ -53,7 +53,7 @@ public:
virtual ~LLWholeModelFeeObserver() {}
virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
- virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) = 0;
+ virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result) = 0;
LLHandle<LLWholeModelFeeObserver> getWholeModelFeeObserverHandle() const { return mWholeModelFeeObserverHandle; }
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index fe67182bc4..3dd2f402fe 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -374,6 +374,11 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL;
if(can_afford_transaction(amount))
{
+ if (uuid.isNull())
+ {
+ LL_WARNS() << "Failed to send L$ gift to to Null UUID." << LL_ENDL;
+ return;
+ }
// gStatusBar->debitBalance(amount);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MoneyTransferRequest);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index efd8a23a5f..fe3e4cdd61 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -268,6 +268,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mData(NULL),
mAudioSourcep(NULL),
mAudioGain(1.f),
+ mSoundCutOffRadius(0.f),
mAppAngle(0.f),
mPixelArea(1024.f),
mInventory(NULL),
@@ -1245,6 +1246,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LLUUID audio_uuid;
LLUUID owner_id; // only valid if audio_uuid or particle system is not null
F32 gain;
+ F32 cutoff;
U8 sound_flags;
mesgsys->getU32Fast( _PREHASH_ObjectData, _PREHASH_CRC, crc, block_num);
@@ -1253,6 +1255,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// HACK: Owner id only valid if non-null sound id or particle system
mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id, block_num );
mesgsys->getF32Fast( _PREHASH_ObjectData, _PREHASH_Gain, gain, block_num );
+ mesgsys->getF32Fast( _PREHASH_ObjectData, _PREHASH_Radius, cutoff, block_num );
mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Flags, sound_flags, block_num );
mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Material, material, block_num );
mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_ClickAction, click_action, block_num);
@@ -1261,6 +1264,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num, MAX_OBJECT_BINARY_DATA_SIZE);
mTotalCRC = crc;
+ mSoundCutOffRadius = cutoff;
// Owner ID used for sound muting or particle system muting
setAttachedSound(audio_uuid, owner_id, gain, sound_flags);
@@ -1957,6 +1961,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
mTotalCRC = crc;
+ mSoundCutOffRadius = cutoff;
setAttachedSound(sound_uuid, owner_id, gain, sound_flags);
@@ -5913,6 +5918,8 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
if( gAgent.canAccessMaturityAtGlobal(this->getPositionGlobal()) )
{
//LL_INFOS() << "Playing attached sound " << audio_uuid << LL_ENDL;
+ // recheck cutoff radius in case this update was an object-update with new value
+ mAudioSourcep->checkCutOffRadius();
mAudioSourcep->play(audio_uuid);
}
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index e9ae26939a..03c5403a1e 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -403,6 +403,7 @@ public:
// Owner id is this object's owner
void setAttachedSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, const U8 flags);
void adjustAudioGain(const F32 gain);
+ F32 getSoundCutOffRadius() const { return mSoundCutOffRadius; }
void clearAttachedSound() { mAudioSourcep = NULL; }
// Create if necessary
@@ -790,6 +791,7 @@ protected:
LLPointer<LLViewerPartSourceScript> mPartSourcep; // Particle source associated with this object.
LLAudioSourceVO* mAudioSourcep;
F32 mAudioGain;
+ F32 mSoundCutOffRadius;
F32 mAppAngle; // Apparent visual arc in degrees
F32 mPixelArea; // Apparent area in pixels
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f4c2e93a45..ff5dff1c9b 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4717,7 +4717,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
(image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
{
- if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true))
+ U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA;
+ if (scratch_space.allocate(image_width, image_height, color_fmt, true, true))
{
original_width = gPipeline.mDeferredScreen.getWidth();
original_height = gPipeline.mDeferredScreen.getHeight();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3b51d07f96..71ff441600 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2045,8 +2045,10 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
LL_ERRS() << "Error resetting skeleton" << LL_ENDL;
}
- // Reset attachment points (buildSkeleton only does bones and CVs)
- bool ignore_hud_joints = true;
+ // Reset attachment points
+ // BuildSkeleton only does bones and CVs but we still need to reinit huds
+ // since huds can be animated.
+ bool ignore_hud_joints = !isSelf();
initAttachmentPoints(ignore_hud_joints);
// Fix up collision volumes
@@ -6576,7 +6578,7 @@ void LLVOAvatar::initAttachmentPoints(bool ignore_hud_joints)
LLAvatarXmlInfo::LLAvatarAttachmentInfo *info = *iter;
if (info->mIsHUDAttachment && (!isSelf() || ignore_hud_joints))
{
- //don't process hud joint for other avatars, or when doing a skeleton reset.
+ //don't process hud joint for other avatars.
continue;
}
@@ -10335,7 +10337,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
// Diagnostic list of all textures on our avatar
static std::set<LLUUID> all_textures;
- if (mVisualComplexityStale)
+ if (mVisualComplexityStale)
{
U32 cost = VISUAL_COMPLEXITY_UNKNOWN;
LLVOVolume::texture_cost_t textures;
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 9bc3a2a33b..a6df079223 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1154,7 +1154,7 @@ void LLWorldMapView::drawAvatar(F32 x_pixels,
{
const F32 HEIGHT_THRESHOLD = 7.f;
LLUIImagePtr dot_image = sAvatarLevelImage;
- if (unknown_relative_z)
+ if (unknown_relative_z && llabs(relative_z) > HEIGHT_THRESHOLD)
{
dot_image = sAvatarUnknownImage;
}