summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgtags2
-rw-r--r--BuildParams6
-rw-r--r--doc/contributions.txt10
-rw-r--r--indra/cmake/FindLLQtWebkit.cmake4
-rw-r--r--indra/llcommon/llversionviewer.h2
-rw-r--r--indra/llprimitive/lltextureentry.cpp22
-rw-r--r--indra/llrender/llvertexbuffer.cpp13
-rw-r--r--indra/llui/llcombobox.cpp29
-rw-r--r--indra/llui/llcombobox.h3
-rw-r--r--indra/llui/lldockcontrol.cpp4
-rw-r--r--indra/newview/llagent.cpp51
-rw-r--r--indra/newview/llagent.h10
-rw-r--r--indra/newview/llagentlistener.cpp181
-rw-r--r--indra/newview/llagentlistener.h21
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/lltexturecache.cpp19
-rw-r--r--indra/newview/llviewerobjectlist.cpp56
-rw-r--r--indra/newview/llviewerobjectlist.h4
-rw-r--r--indra/newview/llviewertexture.cpp4
-rw-r--r--indra/newview/llviewertexture.h2
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/llvocache.cpp6
-rw-r--r--indra/newview/llworld.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml7
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml9
-rw-r--r--indra/newview/viewer_manifest.py2
27 files changed, 355 insertions, 139 deletions
diff --git a/.hgtags b/.hgtags
index 87d1546c73..815a3fe29e 100644
--- a/.hgtags
+++ b/.hgtags
@@ -73,3 +73,5 @@ b723921b5c711bd24dbe77dc76ef488b544dac78 DRTVWR-31_2.5.0-release
92e58e51776a4f8c29069b1a62ff21454d2085f0 2.6.0-start
3178e311da3a8739a85363665006ea3c4610cad4 dons-headless-hackathon-work
63a6aedfce785a6c760377bf685b2dae616797d2 2.5.1-start
+4dede9ae1ec74d41f6887719f6f1de7340d8578d 2.5.1-release
+4dede9ae1ec74d41f6887719f6f1de7340d8578d DRTVWR-37_2.5.1-release
diff --git a/BuildParams b/BuildParams
index 8e036ab56b..934bed6c5f 100644
--- a/BuildParams
+++ b/BuildParams
@@ -57,6 +57,12 @@ viewer-release.build_debug_release_separately = true
viewer-release.build_viewer_update_version_manager = true
viewer-release.release-viewer.jira = DRTVWR-13
+viewer-pre-release.viewer_channel = "Second Life Release"
+viewer-pre-release.login_channel = "Second Life Release"
+viewer-pre-release.build_debug_release_separately = true
+viewer-pre-release.build_viewer_update_version_manager = true
+#viewer-pre-release.release-viewer.jira = DRTVWR-13
+
# ========================================
# aimee
# ========================================
diff --git a/doc/contributions.txt b/doc/contributions.txt
index c02c6dba1f..4c2a836b4c 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -84,10 +84,12 @@ Aleric Inglewood
VWR-24315
VWR-24317
VWR-24320
- VWR-24321
+ VWR-24321
+ VWR-24337
VWR-24354
VWR-24366
VWR-24519
+ VWR-24520
SNOW-84
SNOW-477
SNOW-744
@@ -237,6 +239,7 @@ Coaldust Numbers
VWR-1095
Cron Stardust
VWR-10579
+ VWR-25120
Cypren Christenson
STORM-417
Dale Glass
@@ -403,8 +406,12 @@ Jonathan Yap
STORM-977
STORM-979
STORM-980
+ STORM-1040
VWR-17801
VWR-24347
+ STORM-975
+ STORM-990
+ STORM-1020
Kage Pixel
VWR-11
Ken March
@@ -421,6 +428,7 @@ Kitty Barnett
STORM-288
STORM-799
STORM-800
+ STORM-1001
VWR-24217
Kunnis Basiat
VWR-82
diff --git a/indra/cmake/FindLLQtWebkit.cmake b/indra/cmake/FindLLQtWebkit.cmake
index c747ec32a2..4bf5f5cb73 100644
--- a/indra/cmake/FindLLQtWebkit.cmake
+++ b/indra/cmake/FindLLQtWebkit.cmake
@@ -22,9 +22,9 @@ if (PKG_CONFIG_FOUND)
else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
set(_PACKAGE_ARGS libllqtwebkit)
endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
- if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
+ if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.2")
# As virtually nobody will have a pkg-config file for this, do this check always quiet.
- # Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
+ # Unfortunately cmake 2.8.2 or higher is required for pkg_check_modules to have a 'QUIET'.
set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
endif ()
pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 15e3ffe1da..3838b2b16c 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -29,7 +29,7 @@
const S32 LL_VERSION_MAJOR = 2;
const S32 LL_VERSION_MINOR = 5;
-const S32 LL_VERSION_PATCH = 2;
+const S32 LL_VERSION_PATCH = 3;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 861bde5c89..34eff17519 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -423,24 +423,10 @@ S32 LLTextureEntry::setBumpShinyFullbright(U8 bump)
S32 LLTextureEntry::setMediaTexGen(U8 media)
{
- if (mMediaFlags != media)
- {
- mMediaFlags = media;
-
- // Special code for media handling
- if( hasMedia() && mMediaEntry == NULL)
- {
- mMediaEntry = new LLMediaEntry;
- }
- else if ( ! hasMedia() && mMediaEntry != NULL)
- {
- delete mMediaEntry;
- mMediaEntry = NULL;
- }
-
- return TEM_CHANGE_MEDIA;
- }
- return TEM_CHANGE_NONE;
+ S32 result = TEM_CHANGE_NONE;
+ result |= setTexGen(media & TEM_TEX_GEN_MASK);
+ result |= setMediaFlags(media & TEM_MEDIA_MASK);
+ return result;
}
S32 LLTextureEntry::setBumpmap(U8 bump)
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 7b5907a668..1beb74eca6 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -310,7 +310,18 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
//static
void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping)
{
- sEnableVBOs = use_vbo;
+ sEnableVBOs = use_vbo && gGLManager.mHasVertexBufferObject ;
+ if(sEnableVBOs)
+ {
+ //llassert_always(glBindBufferARB) ; //double check the extention for VBO is loaded.
+
+ llinfos << "VBO is enabled." << llendl ;
+ }
+ else
+ {
+ llinfos << "VBO is disabled." << llendl ;
+ }
+
sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ;
LLGLNamePool::registerPool(&sDynamicVBOPool);
LLGLNamePool::registerPool(&sDynamicIBOPool);
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 8b6a73af56..6f9893b07a 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -316,7 +316,7 @@ void LLComboBox::setValue(const LLSD& value)
LLScrollListItem* item = mList->getFirstSelected();
if (item)
{
- setLabel(getSelectedItemLabel());
+ updateLabel();
}
mLastSelectedIndex = mList->getFirstSelectedIndex();
}
@@ -384,6 +384,23 @@ void LLComboBox::setLabel(const LLStringExplicit& name)
}
}
+void LLComboBox::updateLabel()
+{
+ // Update the combo editor with the selected
+ // item label.
+ if (mTextEntry)
+ {
+ mTextEntry->setText(getSelectedItemLabel());
+ mTextEntry->setTentative(FALSE);
+ }
+
+ // If combo box doesn't allow text entry update
+ // the combo button label.
+ if (!mAllowTextEntry)
+ {
+ mButton->setLabel(getSelectedItemLabel());
+ }
+}
BOOL LLComboBox::remove(const std::string& name)
{
@@ -701,13 +718,13 @@ void LLComboBox::onItemSelected(const LLSD& data)
mLastSelectedIndex = getCurrentIndex();
if (mLastSelectedIndex != -1)
{
- setLabel(getSelectedItemLabel());
+ updateLabel();
if (mAllowTextEntry)
- {
- gFocusMgr.setKeyboardFocus(mTextEntry);
- mTextEntry->selectAll();
- }
+ {
+ gFocusMgr.setKeyboardFocus(mTextEntry);
+ mTextEntry->selectAll();
+ }
}
// hiding the list reasserts the old value stored in the text editor/dropdown button
hideList();
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 74d64269bd..e9ef9d07e4 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -148,6 +148,9 @@ public:
// This is probably a UI abuse.
void setLabel(const LLStringExplicit& name);
+ // Updates the combobox label to match the selected list item.
+ void updateLabel();
+
BOOL remove(const std::string& name); // remove item "name", return TRUE if found and removed
BOOL setCurrentByIndex( S32 index );
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index f6f5a0beb3..5ed2c27160 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -160,8 +160,10 @@ bool LLDockControl::isDockVisible()
case TOP:
{
// check is dock inside parent rect
+ // assume that parent for all dockable flaoters
+ // is the root view
LLRect dockParentRect =
- mDockWidget->getParent()->calcScreenRect();
+ mDockWidget->getRootView()->calcScreenRect();
if (dockRect.mRight <= dockParentRect.mLeft
|| dockRect.mLeft >= dockParentRect.mRight)
{
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 7d491a7774..9025982310 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1214,6 +1214,12 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s
return;
}
+ // Are there any pending callbacks from previous auto pilot requests?
+ if (mAutoPilotFinishedCallback)
+ {
+ mAutoPilotFinishedCallback(dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
+ }
+
mAutoPilotFinishedCallback = finish_callback;
mAutoPilotCallbackData = callback_data;
mAutoPilotRotationThreshold = rot_threshold;
@@ -1262,22 +1268,8 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s
}
mAutoPilot = TRUE;
- mAutoPilotTargetGlobal = target_global;
-
- // trace ray down to find height of destination from ground
- LLVector3d traceEndPt = target_global;
- traceEndPt.mdV[VZ] -= 20.f;
-
- LLVector3d targetOnGround;
- LLVector3 groundNorm;
- LLViewerObject *obj;
+ setAutoPilotTargetGlobal(target_global);
- LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj);
- F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]);
-
- // clamp z value of target to minimum height above ground
- mAutoPilotTargetGlobal.mdV[VZ] = targetOnGround.mdV[VZ] + target_height;
- mAutoPilotTargetDist = (F32)dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal);
if (target_rotation)
{
mAutoPilotUseRotation = TRUE;
@@ -1295,12 +1287,36 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s
//-----------------------------------------------------------------------------
+// setAutoPilotTargetGlobal
+//-----------------------------------------------------------------------------
+void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global)
+{
+ if (mAutoPilot)
+ {
+ mAutoPilotTargetGlobal = target_global;
+
+ // trace ray down to find height of destination from ground
+ LLVector3d traceEndPt = target_global;
+ traceEndPt.mdV[VZ] -= 20.f;
+
+ LLVector3d targetOnGround;
+ LLVector3 groundNorm;
+ LLViewerObject *obj;
+
+ LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj);
+ F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]);
+
+ // clamp z value of target to minimum height above ground
+ mAutoPilotTargetGlobal.mdV[VZ] = targetOnGround.mdV[VZ] + target_height;
+ mAutoPilotTargetDist = (F32)dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal);
+ }
+}
+
+//-----------------------------------------------------------------------------
// startFollowPilot()
//-----------------------------------------------------------------------------
void LLAgent::startFollowPilot(const LLUUID &leader_id)
{
- if (!mAutoPilot) return;
-
mLeaderID = leader_id;
if ( mLeaderID.isNull() ) return;
@@ -1338,6 +1354,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
if (mAutoPilotFinishedCallback)
{
mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
+ mAutoPilotFinishedCallback = NULL;
}
mLeaderID = LLUUID::null;
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 896408c0dd..0fc77bd3a1 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -467,6 +467,14 @@ public:
public:
BOOL getAutoPilot() const { return mAutoPilot; }
LLVector3d getAutoPilotTargetGlobal() const { return mAutoPilotTargetGlobal; }
+ LLUUID getAutoPilotLeaderID() const { return mLeaderID; }
+ F32 getAutoPilotStopDistance() const { return mAutoPilotStopDistance; }
+ F32 getAutoPilotTargetDist() const { return mAutoPilotTargetDist; }
+ BOOL getAutoPilotUseRotation() const { return mAutoPilotUseRotation; }
+ LLVector3 getAutoPilotTargetFacing() const { return mAutoPilotTargetFacing; }
+ F32 getAutoPilotRotationThreshold() const { return mAutoPilotRotationThreshold; }
+ std::string getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; }
+
void startAutoPilotGlobal(const LLVector3d &pos_global,
const std::string& behavior_name = std::string(),
const LLQuaternion *target_rotation = NULL,
@@ -474,7 +482,7 @@ public:
F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f);
void startFollowPilot(const LLUUID &leader_id);
void stopAutoPilot(BOOL user_cancel = FALSE);
- void setAutoPilotGlobal(const LLVector3d &pos_global);
+ void setAutoPilotTargetGlobal(const LLVector3d &target_global);
void autoPilot(F32 *delta_yaw); // Autopilot walking action, angles in radians
void renderAutoPilotTarget();
private:
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index da5bf59e74..d0361bf768 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -45,14 +45,14 @@ LLAgentListener::LLAgentListener(LLAgent &agent)
"LLAgent listener to (e.g.) teleport, sit, stand, etc."),
mAgent(agent)
{
- add("requestTeleport",
+ add("requestTeleport",
"Teleport: [\"regionname\"], [\"x\"], [\"y\"], [\"z\"]\n"
"If [\"skip_confirmation\"] is true, use LLURLDispatcher rather than LLCommandDispatcher.",
&LLAgentListener::requestTeleport);
- add("requestSit",
+ add("requestSit",
"Ask to sit on the object specified in [\"obj_uuid\"]",
&LLAgentListener::requestSit);
- add("requestStand",
+ add("requestStand",
"Ask to stand up",
&LLAgentListener::requestStand);
add("resetAxes",
@@ -73,50 +73,85 @@ LLAgentListener::LLAgentListener(LLAgent &agent)
"[\"quat\"]: array of [x, y, z, w] quaternion values",
&LLAgentListener::getPosition,
LLSDMap("reply", LLSD()));
+ add("startAutoPilot",
+ "Start the autopilot system using the following parameters:\n"
+ "[\"target_global\"]: array of target global {x, y, z} position\n"
+ "[\"stop_distance\"]: target maxiumum distance from target [default: autopilot guess]\n"
+ "[\"target_rotation\"]: array of [x, y, z, w] quaternion values [default: no target]\n"
+ "[\"rotation_threshold\"]: target maximum angle from target facing rotation [default: 0.03 radians]\n"
+ "[\"behavior_name\"]: name of the autopilot behavior [default: \"\"]",
+ //"[\"callback_pump\"]: pump to send success/failure and callback data to [default: none]\n"
+ //"[\"callback_data\"]: data to send back during a callback [default: none]",
+ &LLAgentListener::startAutoPilot);
+ add("getAutoPilot",
+ "Send information about current state of the autopilot system to [\"reply\"]:\n"
+ "[\"enabled\"]: boolean indicating whether or not autopilot is enabled\n"
+ "[\"target_global\"]: array of target global {x, y, z} position\n"
+ "[\"leader_id\"]: uuid of target autopilot is following\n"
+ "[\"stop_distance\"]: target maximum distance from target\n"
+ "[\"target_distance\"]: last known distance from target\n"
+ "[\"use_rotation\"]: boolean indicating if autopilot has a target facing rotation\n"
+ "[\"target_facing\"]: array of {x, y} target direction to face\n"
+ "[\"rotation_threshold\"]: target maximum angle from target facing rotation\n"
+ "[\"behavior_name\"]: name of the autopilot behavior",
+ &LLAgentListener::getAutoPilot,
+ LLSDMap("reply", LLSD()));
+ add("startFollowPilot",
+ "Follow [\"leader_id\"] using the autopilot system.",
+ &LLAgentListener::startFollowPilot);
+ add("setAutoPilotTarget",
+ "Update target for currently running autopilot:\n"
+ "[\"target_global\"]: array of target global {x, y, z} position",
+ &LLAgentListener::setAutoPilotTarget);
+ add("stopAutoPilot",
+ "Stop the autopilot system:\n"
+ "[\"user_cancel\"] indicates whether or not to act as though user canceled autopilot [default: false]",
+ &LLAgentListener::stopAutoPilot);
+
}
void LLAgentListener::requestTeleport(LLSD const & event_data) const
{
- if(event_data["skip_confirmation"].asBoolean())
- {
- LLSD params(LLSD::emptyArray());
- params.append(event_data["regionname"]);
- params.append(event_data["x"]);
- params.append(event_data["y"]);
- params.append(event_data["z"]);
- LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, true);
- // *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "parcel", "login", login_refresh", "balance", "chat"
- // should we just compose LLCommandHandler and LLDispatchListener?
- }
- else
- {
- std::string url = LLSLURL(event_data["regionname"],
- LLVector3(event_data["x"].asReal(),
- event_data["y"].asReal(),
- event_data["z"].asReal())).getSLURLString();
- LLURLDispatcher::dispatch(url, NULL, false);
- }
+ if(event_data["skip_confirmation"].asBoolean())
+ {
+ LLSD params(LLSD::emptyArray());
+ params.append(event_data["regionname"]);
+ params.append(event_data["x"]);
+ params.append(event_data["y"]);
+ params.append(event_data["z"]);
+ LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, true);
+ // *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "parcel", "login", login_refresh", "balance", "chat"
+ // should we just compose LLCommandHandler and LLDispatchListener?
+ }
+ else
+ {
+ std::string url = LLSLURL(event_data["regionname"],
+ LLVector3(event_data["x"].asReal(),
+ event_data["y"].asReal(),
+ event_data["z"].asReal())).getSLURLString();
+ LLURLDispatcher::dispatch(url, NULL, false);
+ }
}
void LLAgentListener::requestSit(LLSD const & event_data) const
{
- //mAgent.getAvatarObject()->sitOnObject();
- // shamelessly ripped from llviewermenu.cpp:handle_sit_or_stand()
- // *TODO - find a permanent place to share this code properly.
- LLViewerObject *object = gObjectList.findObject(event_data["obj_uuid"]);
+ //mAgent.getAvatarObject()->sitOnObject();
+ // shamelessly ripped from llviewermenu.cpp:handle_sit_or_stand()
+ // *TODO - find a permanent place to share this code properly.
+ LLViewerObject *object = gObjectList.findObject(event_data["obj_uuid"]);
- if (object && object->getPCode() == LL_PCODE_VOLUME)
- {
- gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, mAgent.getID());
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, mAgent.getSessionID());
- gMessageSystem->nextBlockFast(_PREHASH_TargetObject);
- gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID);
- gMessageSystem->addVector3Fast(_PREHASH_Offset, LLVector3(0,0,0));
-
- object->getRegion()->sendReliableMessage();
- }
+ if (object && object->getPCode() == LL_PCODE_VOLUME)
+ {
+ gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
+ gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, mAgent.getID());
+ gMessageSystem->addUUIDFast(_PREHASH_SessionID, mAgent.getSessionID());
+ gMessageSystem->nextBlockFast(_PREHASH_TargetObject);
+ gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID);
+ gMessageSystem->addVector3Fast(_PREHASH_Offset, LLVector3(0,0,0));
+
+ object->getRegion()->sendReliableMessage();
+ }
else
{
llwarns << "LLAgent requestSit could not find the sit target "
@@ -126,7 +161,7 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
void LLAgentListener::requestStand(LLSD const & event_data) const
{
- mAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
+ mAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}
void LLAgentListener::resetAxes(const LLSD& event) const
@@ -158,17 +193,69 @@ void LLAgentListener::getAxes(const LLSD& event) const
void LLAgentListener::getPosition(const LLSD& event) const
{
- LLVector3 region_pos(mAgent.getPositionAgent());
- LLVector3 global_pos(mAgent.getPositionGlobal());
- LLQuaternion quat(mAgent.getQuat());
F32 roll, pitch, yaw;
+ LLQuaternion quat(mAgent.getQuat());
quat.getEulerAngles(&roll, &pitch, &yaw);
- // The official query API for LLQuaternion's [x, y, z, w] values is its
- // public member mQ...
sendReply(LLSDMap
- ("region", llsd_copy_array(boost::begin(region_pos.mV), boost::end(region_pos.mV)))
- ("global", llsd_copy_array(boost::begin(global_pos.mV), boost::end(global_pos.mV)))
- ("quat", llsd_copy_array(boost::begin(quat.mQ), boost::end(quat.mQ)))
+ ("region", ll_sd_from_vector3(mAgent.getPositionAgent()))
+ ("global", ll_sd_from_vector3d(mAgent.getPositionGlobal()))
+ ("quat", ll_sd_from_quaternion(quat))
("euler", LLSDMap("roll", roll)("pitch", pitch)("yaw", yaw)),
event);
}
+
+
+void LLAgentListener::startAutoPilot(LLSD const & event) const
+{
+ LLQuaternion target_rotation_value;
+ LLQuaternion* target_rotation = NULL;
+ if (event.has("target_rotation"))
+ {
+ target_rotation_value = ll_quaternion_from_sd(event["target_rotation"]);
+ target_rotation = &target_rotation_value;
+ }
+ // *TODO: Use callback_pump and callback_data
+ F32 rotation_threshold = 0.03f;
+ if (event.has("rotation_threshold"))
+ {
+ rotation_threshold = event["rotation_threshold"].asReal();
+ }
+ mAgent.startAutoPilotGlobal(ll_vector3d_from_sd(event["target_global"]),
+ event["behavior_name"],
+ target_rotation,
+ NULL, NULL,
+ event["stop_distance"].asReal(),
+ rotation_threshold);
+}
+
+void LLAgentListener::getAutoPilot(const LLSD& event) const
+{
+ sendReply(LLSDMap
+ ("enabled", (LLSD::Boolean) mAgent.getAutoPilot())
+ ("target_global", ll_sd_from_vector3d(mAgent.getAutoPilotTargetGlobal()))
+ ("leader_id", mAgent.getAutoPilotLeaderID())
+ ("stop_distance", mAgent.getAutoPilotStopDistance())
+ ("target_distance", mAgent.getAutoPilotTargetDist())
+ ("use_rotation", (LLSD::Boolean) mAgent.getAutoPilotUseRotation())
+ ("target_facing", ll_sd_from_vector3(mAgent.getAutoPilotTargetFacing()))
+ ("rotation_threshold", mAgent.getAutoPilotRotationThreshold())
+ ("behavior_name", mAgent.getAutoPilotBehaviorName()),
+ event);
+}
+
+void LLAgentListener::startFollowPilot(LLSD const & event) const
+{
+ mAgent.startFollowPilot(event["leader_id"]);
+}
+
+void LLAgentListener::setAutoPilotTarget(LLSD const & event) const
+{
+ LLVector3d target_global(ll_vector3d_from_sd(event["target_global"]));
+ mAgent.setAutoPilotTargetGlobal(target_global);
+}
+
+void LLAgentListener::stopAutoPilot(LLSD const & event) const
+{
+ mAgent.stopAutoPilot(event["user_cancel"]);
+}
+
diff --git a/indra/newview/llagentlistener.h b/indra/newview/llagentlistener.h
index 6f087fc3da..40225c9c63 100644
--- a/indra/newview/llagentlistener.h
+++ b/indra/newview/llagentlistener.h
@@ -38,18 +38,23 @@ class LLSD;
class LLAgentListener : public LLEventAPI
{
public:
- LLAgentListener(LLAgent &agent);
+ LLAgentListener(LLAgent &agent);
private:
- void requestTeleport(LLSD const & event_data) const;
- void requestSit(LLSD const & event_data) const;
- void requestStand(LLSD const & event_data) const;
- void resetAxes(const LLSD& event) const;
- void getAxes(const LLSD& event) const;
- void getPosition(const LLSD& event) const;
+ void requestTeleport(LLSD const & event_data) const;
+ void requestSit(LLSD const & event_data) const;
+ void requestStand(LLSD const & event_data) const;
+ void resetAxes(const LLSD& event) const;
+ void getAxes(const LLSD& event) const;
+ void getPosition(const LLSD& event) const;
+ void startAutoPilot(const LLSD& event) const;
+ void getAutoPilot(const LLSD& event) const;
+ void startFollowPilot(const LLSD& event) const;
+ void setAutoPilotTarget(const LLSD& event) const;
+ void stopAutoPilot(const LLSD& event) const;
private:
- LLAgent & mAgent;
+ LLAgent & mAgent;
};
#endif // LL_LLAGENTLISTENER_H
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 2c79749894..217ff20fff 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1677,8 +1677,8 @@ bool LLAppViewer::cleanup()
// Delete workers first
// shotdown all worker threads before deleting them in case of co-dependencies
- sTextureCache->shutdown();
sTextureFetch->shutdown();
+ sTextureCache->shutdown();
sImageDecodeThread->shutdown();
sTextureFetch->shutDownTextureCacheThread() ;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 7ced909dd3..b2e0c81b73 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -773,6 +773,7 @@ bool idle_startup()
gViewerWindow->setNormalControlsVisible( FALSE );
gLoginMenuBarView->setVisible( TRUE );
gLoginMenuBarView->setEnabled( TRUE );
+ show_debug_menus();
// Hide the splash screen
LLSplashScreen::hide();
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index f54214b95c..7fb52c1939 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1419,22 +1419,21 @@ void LLTextureCache::readHeaderCache()
}
}
}
- if (num_entries > sCacheMaxEntries)
+ if (num_entries - empty_entries > sCacheMaxEntries)
{
// Special case: cache size was reduced, need to remove entries
// Note: After we prune entries, we will call this again and create the LRU
- U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries;
+ U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries;
llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl;
- if (entries_to_purge > 0)
+ // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have:
+ // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge
+ // So, it's certain that iter will never reach lru.end() first.
+ std::set<lru_data_t>::iterator iter = lru.begin();
+ while (purge_list.size() < entries_to_purge)
{
- for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter)
- {
- purge_list.insert(iter->second);
- if (purge_list.size() >= entries_to_purge)
- break;
- }
+ purge_list.insert(iter->second);
+ ++iter;
}
- llassert_always(purge_list.size() >= entries_to_purge);
}
else
{
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 80d8c8e332..da95bacc41 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -881,13 +881,14 @@ void LLViewerObjectList::clearDebugText()
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
LLMemType mt(LLMemType::MTYPE_OBJECT);
- if (mDeadObjects.count(objectp->mID))
+ if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
{
- llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl;
- return;
+ llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;
+ }
+ else
+ {
+ mDeadObjects.insert(objectp->mID);
}
-
- mDeadObjects.insert(std::pair<LLUUID, LLPointer<LLViewerObject> >(objectp->mID, objectp));
// Cleanup any references we have to this object
// Remove from object map so noone can look it up.
@@ -1137,6 +1138,46 @@ bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp)
return false ;
}
+//make sure the region is cleaned up.
+void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
+{
+ std::set<LLViewerObject*> dead_object_list ;
+ std::set<LLViewerObject*> region_object_list ;
+ for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter)
+ {
+ LLViewerObject* objectp = *iter;
+
+ if(objectp->isDead())
+ {
+ dead_object_list.insert(objectp) ;
+ }
+ else if(objectp->getRegion() == regionp)
+ {
+ region_object_list.insert(objectp) ;
+ }
+ }
+
+ if(dead_object_list.size() > 0)
+ {
+ llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ;
+
+ for(std::set<LLViewerObject*>::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter)
+ {
+ cleanupReferences(*iter) ;
+ }
+ }
+ if(region_object_list.size() > 0)
+ {
+ llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ;
+
+ for(std::set<LLViewerObject*>::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter)
+ {
+ (*iter)->markDead() ;
+ }
+ }
+}
+
+
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
@@ -1156,7 +1197,10 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
LLViewerObject* objectp = *iter;
- llassert_always(!objectp->isDead());
+ if(objectp->isDead())//some dead objects somehow not cleaned.
+ {
+ continue ;
+ }
if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment())
{
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 8cff8e988a..22a7f97c38 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -88,6 +88,7 @@ public:
void shiftObjects(const LLVector3 &offset);
bool hasMapObjectInRegion(LLViewerRegion* regionp) ;
+ void clearAllMapObjectsInRegion(LLViewerRegion* regionp) ;
void renderObjectsForMap(LLNetMap &netmap);
void renderObjectBounds(const LLVector3 &center);
@@ -181,8 +182,7 @@ protected:
vobj_list_t mMapObjects;
- typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map;
- vo_map mDeadObjects; // Need to keep multiple entries per UUID
+ std::set<LLUUID> mDeadObjects;
std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 16e73da79b..cc635f71f9 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2689,12 +2689,10 @@ void LLViewerFetchedTexture::saveRawImage()
mLastReferencedSavedRawImageTime = sCurrentTime ;
}
-void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, bool from_callback)
+void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard)
{
if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard)
{
- llassert_always(from_callback || mBoostLevel == LLViewerTexture::BOOST_PREVIEW) ;
-
mForceToSaveRawImage = TRUE ;
mDesiredSavedRawDiscardLevel = desired_discard ;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index b5636bbdc7..d512f8ec3a 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -465,7 +465,7 @@ public:
S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;}
BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;}
BOOL isRawImageValid()const { return mIsRawImageValid ; }
- void forceToSaveRawImage(S32 desired_discard = 0, bool from_callback = false) ;
+ void forceToSaveRawImage(S32 desired_discard = 0) ;
/*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
void destroySavedRawImage() ;
LLImageRaw* getSavedRawImage() ;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index a5218786d8..2dddce31da 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -316,6 +316,14 @@ public:
std::string rwind_vector_text;
std::string audio_text;
+ static const std::string beacon_particle = LLTrans::getString("BeaconParticle");
+ static const std::string beacon_physical = LLTrans::getString("BeaconPhysical");
+ static const std::string beacon_scripted = LLTrans::getString("BeaconScripted");
+ static const std::string beacon_scripted_touch = LLTrans::getString("BeaconScriptedTouch");
+ static const std::string beacon_sound = LLTrans::getString("BeaconSound");
+ static const std::string beacon_media = LLTrans::getString("BeaconMedia");
+ static const std::string particle_hiding = LLTrans::getString("ParticleHiding");
+
// Draw the statistics in a light gray
// and in a thin font
mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f );
@@ -566,33 +574,33 @@ public:
{
if (LLPipeline::getRenderParticleBeacons(NULL))
{
- addText(xpos, ypos, "Viewing particle beacons (blue)");
+ addText(xpos, ypos, beacon_particle);
ypos += y_inc;
}
if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES))
{
- addText(xpos, ypos, "Hiding particles");
+ addText(xpos, ypos, particle_hiding);
ypos += y_inc;
}
if (LLPipeline::getRenderPhysicalBeacons(NULL))
{
- addText(xpos, ypos, "Viewing physical object beacons (green)");
+ addText(xpos, ypos, beacon_physical);
ypos += y_inc;
}
if (LLPipeline::getRenderScriptedBeacons(NULL))
{
- addText(xpos, ypos, "Viewing scripted object beacons (red)");
+ addText(xpos, ypos, beacon_scripted);
ypos += y_inc;
}
else
if (LLPipeline::getRenderScriptedTouchBeacons(NULL))
{
- addText(xpos, ypos, "Viewing scripted object with touch function beacons (red)");
+ addText(xpos, ypos, beacon_scripted_touch);
ypos += y_inc;
}
if (LLPipeline::getRenderSoundBeacons(NULL))
{
- addText(xpos, ypos, "Viewing sound beacons (yellow)");
+ addText(xpos, ypos, beacon_sound);
ypos += y_inc;
}
}
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index a933500706..b888a263d0 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -71,6 +71,7 @@ LLVOCacheEntry::LLVOCacheEntry()
}
LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
+ : mBuffer(NULL)
{
S32 size = -1;
BOOL success;
@@ -135,7 +136,10 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
LLVOCacheEntry::~LLVOCacheEntry()
{
- delete [] mBuffer;
+ if(mBuffer)
+ {
+ delete[] mBuffer;
+ }
}
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index c09cafc1eb..c6f9b6f6e4 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -277,7 +277,9 @@ void LLWorld::removeRegion(const LLHost &host)
updateWaterObjects();
- llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
+ //double check all objects of this region are removed.
+ gObjectList.clearAllMapObjectsInRegion(regionp) ;
+ //llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
}
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index f423dbb91c..daf571297f 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -214,10 +214,9 @@ background_visible="true"
<menu_button
follows="bottom|left|right"
height="23"
- image_disabled="ComboButton_Off"
- image_unselected="ComboButton_Off"
- image_pressed="ComboButton_Off"
- image_pressed_selected="ComboButton_Off"
+ image_disabled="ComboButton_UpOff"
+ image_unselected="ComboButton_UpOff"
+ image_selected="ComboButton_UpSelected"
layout="topleft"
mouse_opaque="false"
name="overflow_btn"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c0d5f93f83..d0625d9755 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3426,4 +3426,13 @@ Abuse Report</string>
<string name="Z">Z</string>
<!-- Key names end -->
+ <!-- llviewerwindow -->
+ <string name="BeaconParticle">Viewing particle beacons (blue)</string>
+ <string name="BeaconPhysical">Viewing physical object beacons (green)</string>
+ <string name="BeaconScripted">Viewing scripted object beacons (red)</string>
+ <string name="BeaconScriptedTouch">Viewing scripted object with touch function beacons (red)</string>
+ <string name="BeaconSound">Viewing sound beacons (yellow)</string>
+ <string name="BeaconMedia">Viewing media beacons (white)</string>
+ <string name="ParticleHiding">Hiding Particles</string>
+
</strings>
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 1722c84d34..4c4b90855c 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -803,7 +803,7 @@ class DarwinManifest(ViewerManifest):
self.run_command('SetFile -a V %r' % pathname)
# Create the alias file (which is a resource file) from the .r
- self.run_command('rez %r -o %r' %
+ self.run_command('Rez %r -o %r' %
(self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"),
os.path.join(volpath, "Applications")))