summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave SIMmONs <simon@lindenlab.com>2011-03-15 09:10:39 -0700
committerDave SIMmONs <simon@lindenlab.com>2011-03-15 09:10:39 -0700
commit57ac771b154d7722e4774b40a607a11f3286f472 (patch)
tree20a555064cedcbdd6bbea3dbeeb866f95601ba19 /indra/newview
parent18ae6c639e58c4c996d4c3b2a4b34ef41deab970 (diff)
parentbc0833d5db9e887f72ea6e7a630781203ad6ad77 (diff)
Merge
Diffstat (limited to 'indra/newview')
-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
17 files changed, 290 insertions, 109 deletions
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")))