summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/gpu_table.txt1
-rw-r--r--indra/newview/llagent.cpp59
-rw-r--r--indra/newview/llagent.h3
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/lldrawable.cpp13
-rw-r--r--indra/newview/llfloaterpreference.cpp2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp7
-rw-r--r--indra/newview/llinventorybridge.cpp39
-rw-r--r--indra/newview/llpanelavatar.cpp13
-rw-r--r--indra/newview/llpanelavatar.h1
-rw-r--r--indra/newview/llstartup.cpp30
-rw-r--r--indra/newview/llstatusbar.h16
-rw-r--r--indra/newview/lltooldraganddrop.cpp12
-rw-r--r--indra/newview/llviewerinventory.cpp22
-rw-r--r--indra/newview/llviewerinventory.h6
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/llviewerobject.cpp16
-rw-r--r--indra/newview/llviewerobject.h1
-rw-r--r--indra/newview/llviewerparcelmgr.cpp32
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/llviewertexteditor.cpp6
-rw-r--r--indra/newview/llviewerwindow.cpp27
-rw-r--r--indra/newview/llviewerwindow.h2
-rw-r--r--indra/newview/llworld.cpp5
-rw-r--r--indra/newview/llworldmapview.cpp12
-rw-r--r--indra/newview/llworldmapview.h7
27 files changed, 278 insertions, 64 deletions
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 91d59a2c6b..4b9bf655b5 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -119,6 +119,7 @@ NVIDIA GeForce Go 6800 .*NVIDIA.*GeForce Go 68.* 2
NVIDIA GeForce Go 7300 .*NVIDIA.*GeForce Go 73.* 3
NVIDIA GeForce Go 7400 .*NVIDIA.*GeForce Go 74.* 3
NVIDIA GeForce Go 7600 .*NVIDIA.*GeForce Go 76.* 3
+NVIDIA GeForce Go 7700 .*NVIDIA.*GeForce Go 77.* 3
NVIDIA GeForce Go 7800 .*NVIDIA.*GeForce Go 78.* 3
NVIDIA GeForce Go 7900 .*NVIDIA.*GeForce Go 79.* 3
NVIDIA GeForce Go 6 .*GeForce Go 6.* 2
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a692ef6a3e..f406d61a9e 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -305,7 +305,7 @@ LLAgent::LLAgent()
mbAlwaysRun(FALSE),
mShowAvatar(TRUE),
-
+
mCameraAnimating( FALSE ),
mAnimationCameraStartGlobal(),
mAnimationFocusStartGlobal(),
@@ -410,6 +410,8 @@ LLAgent::LLAgent()
mCameraUpVector = LLVector3::z_axis;// default is straight up
mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT );
//end ventrella
+
+ mCustomAnim = FALSE ;
}
// Requires gSavedSettings to be initialized.
@@ -2861,8 +2863,14 @@ void LLAgent::endAnimationUpdateUI()
if (mAvatarObject)
{
- sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
- sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
+ if(mCustomAnim)
+ {
+ sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
+ sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
+
+ mCustomAnim = FALSE ;
+ }
+
}
setLookAt(LOOKAT_TARGET_CLEAR);
}
@@ -4188,7 +4196,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate)
//-----------------------------------------------------------------------------
// changeCameraToCustomizeAvatar()
//-----------------------------------------------------------------------------
-void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
+void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_animate)
{
setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up
gViewerWindow->getWindow()->resetBusyCount();
@@ -4203,16 +4211,16 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
gSavedSettings.setBOOL("ThirdPersonBtnState", FALSE);
gSavedSettings.setBOOL("BuildBtnState", FALSE);
- if (animate)
+ if (camera_animate)
{
startCameraAnimation();
}
// Remove any pitch from the avatar
- LLVector3 at = mFrameAgent.getAtAxis();
- at.mV[VZ] = 0.f;
- at.normVec();
- gAgent.resetAxes(at);
+ //LLVector3 at = mFrameAgent.getAtAxis();
+ //at.mV[VZ] = 0.f;
+ //at.normVec();
+ //gAgent.resetAxes(at);
if( mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR )
{
@@ -4231,22 +4239,31 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
LLVOAvatar::onCustomizeStart();
}
- if (animate && !mAvatarObject.isNull())
+ if (!mAvatarObject.isNull())
{
- sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
- mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
- LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
-
- if (turn_motion)
+ if(avatar_animate)
{
- mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
+ // Remove any pitch from the avatar
+ LLVector3 at = mFrameAgent.getAtAxis();
+ at.mV[VZ] = 0.f;
+ at.normVec();
+ gAgent.resetAxes(at);
- }
- else
- {
- mAnimationDuration = gSavedSettings.getF32("ZoomTime");
- }
+ sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
+ mCustomAnim = TRUE ;
+ mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
+ LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
+
+ if (turn_motion)
+ {
+ mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
+ }
+ else
+ {
+ mAnimationDuration = gSavedSettings.getF32("ZoomTime");
+ }
+ }
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 4e9b882250..5e5a58cffb 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -183,7 +183,7 @@ public:
void changeCameraToDefault();
void changeCameraToMouselook(BOOL animate = TRUE);
void changeCameraToThirdPerson(BOOL animate = TRUE);
- void changeCameraToCustomizeAvatar(BOOL animate = TRUE); // trigger transition animation
+ void changeCameraToCustomizeAvatar(BOOL avatar_animate = TRUE, BOOL camera_animate = TRUE); // trigger transition animation
// Ventrella
void changeCameraToFollow(BOOL animate = TRUE);
//end Ventrella
@@ -735,6 +735,7 @@ private:
ECameraMode mLastCameraMode;
BOOL mViewsPushed; // keep track of whether or not we have pushed views.
+ BOOL mCustomAnim ; //current animation is ANIM_AGENT_CUSTOMIZE ?
BOOL mbAlwaysRun; // should the avatar run rather than walk
BOOL mShowAvatar; // should we render the avatar?
BOOL mCameraAnimating; // camera is transitioning from one mode to another
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index be31d2481e..96d9670ac9 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1263,7 +1263,7 @@ bool LLAppViewer::init()
#if LL_WINDOWS && LL_LCD_COMPILE
// start up an LCD window on a logitech keyboard, if there is one
HINSTANCE hInstance = GetModuleHandle(NULL);
- gLcdScreen = new llLCD(hInstance);
+ gLcdScreen = new LLLCD(hInstance);
CreateLCDDebugWindows();
#endif
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index b5570b1198..17593766b9 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1036,12 +1036,15 @@ F32 LLDrawable::getVisibilityRadius() const
}
else if (isLight())
{
- return llmax(getRadius(), getVOVolume()->getLightRadius());
- }
- else
- {
- return getRadius();
+ const LLVOVolume *vov = getVOVolume();
+ if (vov)
+ {
+ return llmax(getRadius(), vov->getLightRadius());
+ } else {
+ // llwarns ?
+ }
}
+ return getRadius();
}
void LLDrawable::updateUVMinMax()
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 25a88e6e7c..b7b3cef76b 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -79,7 +79,7 @@
#ifndef LL_LOGITECH_LCD_H
#include "lllogitechlcd.h"
#endif
-extern llLCD *gLcdScreen;
+extern LLLCD *gLcdScreen;
#endif
const S32 PREF_BORDER = 4;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index eaf7832eab..ca0314cce1 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2378,7 +2378,12 @@ BOOL LLPanelEstateInfo::checkRemovalButton(std::string name)
}
else if (name == "estate_manager_name_list")
{
- btn_name = "remove_estate_manager_btn";
+ //ONLY OWNER CAN ADD /DELET ESTATE MANAGER
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region && (region->getOwner() == gAgent.getID()))
+ {
+ btn_name = "remove_estate_manager_btn";
+ }
}
// enable the remove button if something is selected
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index d8841afe22..0c8d17e1aa 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -211,6 +211,45 @@ void LLInvFVBridge::showProperties()
void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
{
+ // Deactivate gestures when moving them into Trash
+ LLInvFVBridge* bridge;
+ LLInventoryModel* model = mInventoryPanel->getModel();
+ LLViewerInventoryItem* item = NULL;
+ LLViewerInventoryCategory* cat = NULL;
+ LLInventoryModel::cat_array_t descendent_categories;
+ LLInventoryModel::item_array_t descendent_items;
+ S32 count = batch.count();
+ S32 i,j;
+ for(i = 0; i < count; ++i)
+ {
+ bridge = (LLInvFVBridge*)(batch.get(i));
+ if(!bridge || !bridge->isItemRemovable()) continue;
+ item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID());
+ if (item)
+ {
+ if(LLAssetType::AT_GESTURE == item->getType())
+ {
+ gGestureManager.deactivateGesture(item->getUUID());
+ }
+ }
+ }
+ for(i = 0; i < count; ++i)
+ {
+ bridge = (LLInvFVBridge*)(batch.get(i));
+ if(!bridge || !bridge->isItemRemovable()) continue;
+ cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
+ if (cat)
+ {
+ gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE );
+ for (j=0; j<descendent_items.count(); j++)
+ {
+ if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
+ {
+ gGestureManager.deactivateGesture(descendent_items[j]->getUUID());
+ }
+ }
+ }
+ }
removeBatchNoCheck(batch);
}
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 08c33cb744..4ee155931c 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -290,6 +290,7 @@ void LLPanelAvatarSecondLife::updatePartnerName()
childSetTextArg("partner_edit", "[FIRST]", LLString(first));
childSetTextArg("partner_edit", "[LAST]", LLString(last));
}
+ childSetEnabled("partner_info", TRUE);
}
}
@@ -394,6 +395,16 @@ void LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL(S32 option, void* userda
LLWeb::loadURL("http://secondlife.com/partner");
}
+// static
+void LLPanelAvatarSecondLife::onClickPartnerInfo(void *data)
+{
+ LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*) data;
+ if (self->mPartnerID.notNull())
+ {
+ LLFloaterAvatarInfo::showFromProfile(self->mPartnerID,
+ self->getScreenRect());
+ }
+}
//-----------------------------------------------------------------------------
// LLPanelAvatarFirstLife()
@@ -421,6 +432,8 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
childSetEnabled("born", FALSE);
childSetEnabled("partner_edit", FALSE);
childSetAction("partner_help",onClickPartnerHelp,this);
+ childSetAction("partner_info", onClickPartnerInfo, this);
+ childSetEnabled("partner_info", mPartnerID.notNull());
childSetAction("?",onClickPublishHelp,this);
BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index d4b935f09c..7d491c6143 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -119,6 +119,7 @@ public:
static void onClickPublishHelp(void *userdata);
static void onClickPartnerHelp(void *userdata);
static void onClickPartnerHelpLoadURL(S32 option, void* userdata);
+ static void onClickPartnerInfo(void *userdata);
// Clear out the controls anticipating new network data.
void clearControls();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 21c97c2678..96af7d2bd2 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -122,6 +122,7 @@
#include "llpanelgroupnotices.h"
#include "llpreview.h"
#include "llpreviewscript.h"
+#include "llsecondlifeurls.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llsrv.h"
@@ -153,6 +154,7 @@
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llvoclouds.h"
+#include "llweb.h"
#include "llworld.h"
#include "llworldmap.h"
#include "llxfermanager.h"
@@ -166,7 +168,6 @@
#include "llnamelistctrl.h"
#include "llnamebox.h"
#include "llnameeditor.h"
-#include "llurlsimstring.h"
#if LL_LIBXUL_ENABLED
#include "llmozlib.h"
@@ -2537,17 +2538,22 @@ void set_startup_status(const F32 frac, const char *string, const char* msg)
void login_alert_status(S32 option, void* user_data)
{
- if (0 == option)
- {
- // OK button
- }
- else if (1 == option)
- {
- // Help button
- std::string help_path;
- help_path = gDirUtilp->getExpandedFilename(LL_PATH_HELP, "unable_to_connect.html");
- load_url_local_file(help_path.c_str() );
- }
+ // Buttons
+ switch( option )
+ {
+ case 0: // OK
+ break;
+ case 1: // Help
+ LLWeb::loadURL( SUPPORT_URL );
+ break;
+ case 2: // Teleport
+ // Restart the login process, starting at our home locaton
+ LLURLSimString::setString(LLURLSimString::sLocationStringHome);
+ LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
+ break;
+ default:
+ llwarns << "Missing case in login_alert_status switch" << llendl;
+ }
LLPanelLogin::giveFocus();
}
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 88a97ba71a..d0f3e66fa9 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -48,9 +48,21 @@ class LLFrameTimer;
class LLStatGraph;
// used by LCD screen
-class cLLRegionDetails
+class LLRegionDetails
{
public:
+ LLRegionDetails()
+ {
+ mRegionName = LLString("Unknown");
+ mParcelName = "Unknown";
+ mAccesString = "Unknown";
+ mX = 0;
+ mY = 0;
+ mZ = 0;
+ mArea = 0;
+ mForSale = FALSE;
+ snprintf(mOwner, MAX_STRING, "Unknown");
+ }
LLString mRegionName;
char *mParcelName;
char *mAccesString;
@@ -100,7 +112,7 @@ public:
S32 getSquareMetersCredit() const;
S32 getSquareMetersCommitted() const;
S32 getSquareMetersLeft() const;
- cLLRegionDetails mRegionDetails;
+ LLRegionDetails mRegionDetails;
private:
// simple method to setup the part that holds the date
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 413b26309d..baff994bdd 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1199,6 +1199,16 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
return TRUE;
}
+ // In case the inventory has not been updated (e.g. due to some recent operation
+ // causing a dirty inventory), stall the user while fetching the inventory.
+ if (hit_obj->isInventoryDirty())
+ {
+ hit_obj->fetchInventoryFromServer();
+ LLString::format_map_t args;
+ args["[ERROR_MESSAGE]"] = "Unable to add texture.\nPlease wait a few seconds and try again.";
+ gViewerWindow->alertXml("ErrorMessage", args);
+ return FALSE;
+ }
if (hit_obj->getInventoryItemByAsset(item->getAssetUUID()))
{
// if the asset is already in the object's inventory
@@ -1259,6 +1269,8 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
// Add the texture item to the target object's inventory.
hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ // Force the object to update its refetch its inventory so it has this texture.
+ hit_obj->fetchInventoryFromServer();
// TODO: Check to see if adding the item was successful; if not, then
// we should return false here.
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index b5316d29e0..981605d1fa 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -47,7 +47,7 @@
#include "llviewerregion.h"
#include "llviewerobjectlist.h"
-
+#include "llpreviewgesture.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
@@ -643,6 +643,26 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item)
gGestureManager.activateGesture(inv_item);
}
+void CreateGestureCallback::fire(const LLUUID& inv_item)
+{
+ if (inv_item.isNull())
+ return;
+
+ gGestureManager.activateGesture(inv_item);
+
+ LLViewerInventoryItem* item = gInventory.getItem(inv_item);
+ if (!item) return;
+ gInventory.updateItem(item);
+ gInventory.notifyObservers();
+
+ if(!LLPreview::show(inv_item,FALSE))
+ {
+ LLPreviewGesture* preview = LLPreviewGesture::show(LLString("Gesture: ") + item->getName(), inv_item, LLUUID::null);
+ // Force to be entirely onscreen.
+ gFloaterView->adjustToFitScreen(preview, FALSE);
+ }
+}
+
LLInventoryCallbackManager gInventoryCallbacks;
void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 2aba7f454f..fd6928243b 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -223,6 +223,12 @@ public:
void fire(const LLUUID& inv_item);
};
+class CreateGestureCallback : public LLInventoryCallback
+{
+public:
+ void fire(const LLUUID& inv_item);
+};
+
// misc functions
//void inventory_reliable_callback(void**, S32 status);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 54396d083e..4c7229b0d9 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5272,7 +5272,7 @@ class LLShowFloater : public view_listener_t
{
if (gAgent.getWearablesLoaded())
{
- gAgent.changeCameraToCustomizeAvatar();
+ gAgent.changeCameraToCustomizeAvatar(gSavedSettings.getBOOL("AppearanceCameraMovement"));
}
}
else if (floater_name == "friends")
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index dd786da4d3..2e799039ab 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -284,6 +284,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
{
+ if(!gWorldp) return;
LLViewerRegion *regionp = gWorldp->getRegion(mesgsys->getSender());
if (!regionp || gNoRender)
@@ -2609,6 +2610,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
// Viewer trusts the simulator.
gMessageSystem->enableCircuit(sim_host, TRUE);
+ if(!gWorldp) return;
LLViewerRegion* regionp = gWorldp->addRegion(region_handle, sim_host);
/*
@@ -2716,6 +2718,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
F32 x, y;
from_region_handle(region_handle, &x, &y);
+ if(!gWorldp) return;
LLViewerRegion* regionp = gWorldp->getRegionFromHandle(region_handle);
if (!regionp)
{
@@ -2889,6 +2892,7 @@ void process_crossed_region(LLMessageSystem* msg, void**)
send_complete_agent_movement(sim_host);
+ if(!gWorldp) return;
LLViewerRegion* regionp = gWorldp->addRegion(region_handle, sim_host);
regionp->setSeedCapability(std::string(seedCap));
}
@@ -3273,6 +3277,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
mesgsys->getVector3Fast(_PREHASH_TimeInfo, _PREHASH_SunDirection, sun_direction);
mesgsys->getVector3Fast(_PREHASH_TimeInfo, _PREHASH_SunAngVelocity, sun_ang_velocity);
+ if(!gWorldp) return;
gWorldp->setSpaceTimeUSec(space_time_usec);
//lldebugs << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index f242b06d9b..3a0daba8aa 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2343,8 +2343,19 @@ void LLViewerObject::requestInventory()
doInventoryCallback();
}
// throw away duplicate requests
- else if (! mInventoryPending)
+ else
{
+ fetchInventoryFromServer();
+ }
+}
+
+void LLViewerObject::fetchInventoryFromServer()
+{
+ if (!mInventoryPending)
+ {
+ delete mInventory;
+ mInventory = NULL;
+ mInventoryDirty = FALSE;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RequestTaskInventory);
msg->nextBlockFast(_PREHASH_AgentData);
@@ -2631,6 +2642,9 @@ LLInventoryObject* LLViewerObject::getInventoryRoot()
LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id)
{
+ if (mInventoryDirty)
+ llwarns << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << llendl;
+
LLViewerInventoryItem* rv = NULL;
if(mInventory)
{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index b30bf7e1b8..f2ddc173a0 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -373,6 +373,7 @@ public:
BOOL isInventoryPending() { return mInventoryPending; }
void clearInventoryListeners();
void requestInventory();
+ void fetchInventoryFromServer();
static void processTaskInv(LLMessageSystem* msg, void** user_data);
void removeInventory(const LLUUID& item_id);
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 0ffa37525f..2844cf9356 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -687,6 +687,7 @@ F32 LLViewerParcelMgr::agentDrawDistance() const
BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
{
+ if (!gWorldp) return FALSE;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
if (!region) return FALSE;
@@ -700,6 +701,7 @@ BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
{
+ if (!gWorldp) return FALSE;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
if (!region) return FALSE;
@@ -713,6 +715,7 @@ BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
{
+ if (!gWorldp) return FALSE;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
if (!region) return FALSE;
@@ -726,6 +729,7 @@ BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
BOOL LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const
{
+ if (!gWorldp) return FALSE;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
if (!region) return FALSE;
@@ -769,6 +773,7 @@ BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
{
+ if (!gWorldp) return FALSE;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(pos_global);
if (region != gAgent.getRegion())
{
@@ -826,7 +831,8 @@ void LLViewerParcelMgr::render()
{
// Rendering is done in agent-coordinates, so need to supply
// an appropriate offset to the render code.
- LLViewerRegion *regionp = gWorldp->getRegionFromPosGlobal( mWestSouth );
+ if (!gWorldp) return;
+ LLViewerRegion* regionp = gWorldp->getRegionFromPosGlobal(mWestSouth);
if (!regionp) return;
renderHighlightSegments(mHighlightSegments, regionp);
@@ -858,6 +864,7 @@ void LLViewerParcelMgr::sendParcelAccessListRequest(U32 flags)
return;
}
+ if(!gWorldp) return;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
@@ -893,6 +900,7 @@ void LLViewerParcelMgr::sendParcelDwellRequest()
return;
}
+ if(!gWorldp) return;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
@@ -925,6 +933,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
east_north_region_check.mdV[VX] -= 0.5;
east_north_region_check.mdV[VY] -= 0.5;
+ if(!gWorldp) return;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region)
{
@@ -981,7 +990,8 @@ void LLViewerParcelMgr::sendParcelGodForceToContent()
gViewerWindow->alertXml("CannotContentifyNothingSelected");
return;
}
- LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
+ if(!gWorldp) return;
+ LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region)
{
gViewerWindow->alertXml("CannotContentifyNoRegion");
@@ -1006,6 +1016,7 @@ void LLViewerParcelMgr::sendParcelRelease()
return;
}
+ if(!gWorldp) return;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region)
{
@@ -1068,6 +1079,7 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
return NULL;
}
+ if(!gWorldp) return NULL;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region)
{
@@ -1178,6 +1190,7 @@ void LLViewerParcelMgr::sendParcelDeed(const LLUUID& group_id)
gViewerWindow->alertXml("CannotDeedLandNoGroup");
return;
}
+ if(!gWorldp) return;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region)
{
@@ -1245,7 +1258,7 @@ const LLString& LLViewerParcelMgr::getAgentParcelName() const
void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel)
{
if (!parcel) return;
-
+ if(!gWorldp) return;
LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
@@ -1271,7 +1284,8 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel)
void LLViewerParcelMgr::requestHoverParcelProperties(const LLVector3d& pos)
{
- LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( pos );
+ if(!gWorldp) return;
+ LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos );
if (!region)
{
return;
@@ -1519,7 +1533,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
(request_result == PARCEL_RESULT_MULTIPLE);
// Select the whole parcel
- LLViewerRegion *region = gWorldp->getRegion( msg->getSender() );
+ if(!gWorldp) return;
+ LLViewerRegion* region = gWorldp->getRegion( msg->getSender() );
if (region)
{
if (!snap_selection)
@@ -1975,7 +1990,8 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 which)
return;
}
- LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
+ if(!gWorldp) return;
+ LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
LLMessageSystem* msg = gMessageSystem;
@@ -2166,6 +2182,7 @@ void LLViewerParcelMgr::startReleaseLand()
}
LLVector3d parcel_center = (mWestSouth + mEastNorth) / 2.0;
+ if(!gWorldp) return;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
if (!region)
{
@@ -2270,6 +2287,7 @@ void LLViewerParcelMgr::callbackDivideLand(S32 option, void* data)
LLViewerParcelMgr* self = (LLViewerParcelMgr*)data;
LLVector3d parcel_center = (self->mWestSouth + self->mEastNorth) / 2.0;
+ if(!gWorldp) return;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
if (!region)
{
@@ -2328,6 +2346,7 @@ void LLViewerParcelMgr::callbackJoinLand(S32 option, void* data)
LLViewerParcelMgr* self = (LLViewerParcelMgr*)data;
LLVector3d parcel_center = (self->mWestSouth + self->mEastNorth) / 2.0;
+ if(!gWorldp) return;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
if (!region)
{
@@ -2376,6 +2395,7 @@ void LLViewerParcelMgr::startDeedLandToGroup()
}
LLVector3d parcel_center = (mWestSouth + mEastNorth) / 2.0;
+ if(!gWorldp) return;
LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
if (!region)
{
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 6001cd3e58..ef4ae7652c 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -846,6 +846,7 @@ public:
const LLSD& context,
const LLSD& input) const
{
+ if(!gWorldp) return;
LLHost host(input["sender"].asString());
LLViewerRegion* region = gWorldp->getRegion(host);
if( !region )
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 5c613052ea..bd488577e3 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -1355,7 +1355,11 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, BOOL saved)
void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item )
{
// See if we can bring an existing preview to the front
- if( !LLPreview::show( item->getUUID() ) )
+ // *NOTE: Just for embedded Texture , we should use getAssetUUID(),
+ // not getUUID(), because LLPreviewTexture pass in AssetUUID into
+ // LLPreview constructor ItemUUID parameter.
+
+ if( !LLPreview::show( item->getAssetUUID() ) )
{
// There isn't one, so make a new preview
if(item)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2a496f6698..405a705b62 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1781,6 +1781,22 @@ void adjust_rect_bottom_center(const LLString& control, const LLRect& window)
}
}
+
+void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height)
+{
+ if (delta_width || delta_height )
+ {
+ LLRect mXMLRect = gSavedSettings.getRect(control);
+ //hard code it all follows the right and top
+ mXMLRect.mRight += delta_width;
+ mXMLRect.mTop += delta_height;
+ mXMLRect.mLeft = llmax (0, mXMLRect.mLeft+delta_width);
+ mXMLRect.mBottom = llmax(0,mXMLRect.mBottom+delta_height);
+ gSavedSettings.setRect(control,mXMLRect);
+ }
+}
+
+
// Many rectangles can't be placed until we know the screen size.
// These rectangles have their bottom-left corner as 0,0
void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window)
@@ -2059,7 +2075,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
glViewport(0, 0, width, height );
if (height > 0 && gCamera)
- {
+ {
gCamera->setViewHeightInPixels( height );
if (mWindow->getFullscreen())
{
@@ -2072,6 +2088,9 @@ void LLViewerWindow::reshape(S32 width, S32 height)
}
}
+ // changes in window's width and hight
+ S32 delta_width = width - mWindowRect.getWidth();
+ S32 delta_height = height - mWindowRect.getHeight();
// update our window rectangle
mWindowRect.mRight = mWindowRect.mLeft + width;
mWindowRect.mTop = mWindowRect.mBottom + height;
@@ -2122,6 +2141,12 @@ void LLViewerWindow::reshape(S32 width, S32 height)
{
gSavedSettings.setS32("WindowWidth", window_size.mX);
gSavedSettings.setS32("WindowHeight", window_size.mY);
+ if (!gFloaterMap)
+ {
+ update_saved_window_size("FloaterWorldMapRect",delta_width, delta_height);
+ update_saved_window_size("FloaterMapRect",delta_width, delta_height);
+ }
+
}
}
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 612484e2dc..1053234e8f 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -382,7 +382,7 @@ void toggle_flying(void*);
void toggle_first_person();
void toggle_build(void*);
void reset_viewer_state_on_sim(void);
-
+void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height);
//
// Constants
//
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index e76123557c..ead4654c7f 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -770,6 +770,7 @@ void LLWorld::printPacketsLost()
void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data)
{
+ if(!gWorldp) return;
LLViewerRegion* region = gWorldp->getRegion(msg->getSender());
if( region )
{
@@ -1026,6 +1027,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
// Viewer trusts the simulator.
msg->enableCircuit(sim, TRUE);
+ if(!gWorldp) return;
gWorldp->addRegion(handle, sim);
// give the simulator a message it can use to get ip and port
@@ -1063,6 +1065,7 @@ public:
LLHost sim(input["body"]["sim-ip-and-port"].asString());
+ if(!gWorldp) return;
LLViewerRegion* regionp = gWorldp->getRegion(sim);
if (!regionp)
{
@@ -1081,6 +1084,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
LLHost host = mesgsys->getSender();
//llinfos << "Disabling simulator with message from " << host << llendl;
+ if(!gWorldp) return;
gWorldp->removeRegion(host);
mesgsys->disableCircuit(host);
@@ -1090,6 +1094,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
void process_region_handshake(LLMessageSystem* msg, void** user_data)
{
LLHost host = msg->getSender();
+ if(!gWorldp) return;
LLViewerRegion* regionp = gWorldp->getRegion(host);
if (!regionp)
{
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index ec277b1a1b..b188c70b70 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -100,6 +100,16 @@ S32 LLWorldMapView::sTrackingArrowY = 0;
F32 LLWorldMapView::sPixelsPerMeter = 1.f;
F32 CONE_SIZE = 0.6f;
+
+#define SIM_NULL_MAP_SCALE 1 // width in pixels, where we start drawing "null" sims
+#define SIM_MAP_AGENT_SCALE 2 // width in pixels, where we start drawing agents
+#define SIM_MAP_SCALE 1 // width in pixels, where we start drawing sim tiles
+
+// Updates for agent locations.
+#define AGENTS_UPDATE_TIME 60.0 // in seconds
+
+
+
void LLWorldMapView::initClass()
{
LLUUID image_id;
@@ -458,7 +468,7 @@ void LLWorldMapView::draw()
LLViewerImage* simimage = info->mCurrentImage;
LLViewerImage* overlayimage = info->mOverlayImage;
- if (gMapScale < 8.f)
+ if (gMapScale < SIM_MAP_SCALE)
{
simimage->setBoostLevel(0);
if (overlayimage) overlayimage->setBoostLevel(0);
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index 28ffb421b0..f3c5d654b6 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -52,13 +52,6 @@ class LLCoordGL;
class LLViewerImage;
class LLTextBox;
-#define SIM_NULL_MAP_SCALE 2 // width in pixels, where we start drawing "null" sims
-#define SIM_MAP_AGENT_SCALE 20 // width in pixels, where we start drawing agents
-#define SIM_MAP_SCALE 90 // width in pixels, where we start drawing sim tiles
-
-// Updates for agent locations.
-#define AGENTS_UPDATE_TIME 60.0 // in seconds
-
class LLWorldMapView : public LLPanel
{