summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp5
-rwxr-xr-xindra/newview/llviewermessage.cpp80
-rw-r--r--indra/newview/llviewerobjectlist.cpp12
-rw-r--r--indra/newview/llviewerobjectlist.h1
4 files changed, 40 insertions, 58 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index bffa1708ec..777fe4b8f1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4267,11 +4267,6 @@ void LLAppViewer::idle()
llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl;
gObjectList.mNumDeadObjectUpdates = 0;
}
- if (gObjectList.mNumUnknownKills)
- {
- llinfos << "Kills on unknown objects: " << gObjectList.mNumUnknownKills << llendl;
- gObjectList.mNumUnknownKills = 0;
- }
if (gObjectList.mNumUnknownUpdates)
{
llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 67d400af2d..62d4e779d0 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4483,40 +4483,42 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_
static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects");
+const U32 KILLOBJECT_DELETE_OPCODE = 0;
+
void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
{
LLFastTimer t(FTM_PROCESS_OBJECTS);
- LLUUID id;
- U32 local_id;
- S32 i = 0;
- S32 num_objects;
-
- num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
+ LLUUID id;
- mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
+ U32 ip = mesgsys->getSenderIP();
+ U32 port = mesgsys->getSenderPort();
LLViewerRegion* regionp = NULL;
- bool remove_from_cache = !local_id; //if the first local id is 0, physically remove all objects from VO cache.
- if(remove_from_cache)
{
- i++;
-
- LLHost host(gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort());
+ LLHost host(ip, port);
regionp = LLWorld::getInstance()->getRegion(host);
}
- for (; i < num_objects; i++)
+
+ bool delete_object = false;
+ S32 num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
+ for (S32 i = 0; i < num_objects; ++i)
{
+ U32 local_id;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
+ if (local_id == KILLOBJECT_DELETE_OPCODE)
+ {
+ // This local_id is invalid, but was sent by the server to flag
+ // all subsequent local_id's as objects that were actually deleted
+ // rather than unsubscribed from interestlist.
+ delete_object = true;
+ continue;
+ }
- LLViewerObjectList::getUUIDFromLocal(id,
- local_id,
- gMessageSystem->getSenderIP(),
- gMessageSystem->getSenderPort());
+ LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port);
if (id == LLUUID::null)
{
LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
- gObjectList.mNumUnknownKills++;
continue;
}
else
@@ -4524,39 +4526,35 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
LL_DEBUGS("Messaging") << "Kill message for local " << local_id << LL_ENDL;
}
- // ...don't kill the avatar
- if (!(id == gAgentID))
+ if (id == gAgentID)
{
- LLViewerObject *objectp = gObjectList.findObject(id);
- if (objectp)
- {
- // Display green bubble on kill
- if ( gShowObjectUpdates )
- {
- LLColor4 color(0.f,1.f,0.f,1.f);
- gPipeline.addDebugBlip(objectp->getPositionAgent(), color);
- }
-
- // Do the kill
- gObjectList.killObject(objectp);
- }
- //else
- //{
- // LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL;
- // gObjectList.mNumUnknownKills++;
- //}
+ // never kill our avatar
+ continue;
+ }
- if(remove_from_cache)
+ LLViewerObject *objectp = gObjectList.findObject(id);
+ if (objectp)
+ {
+ // Display green bubble on kill
+ if ( gShowObjectUpdates )
{
- regionp->killCacheEntry(local_id);
+ LLColor4 color(0.f,1.f,0.f,1.f);
+ gPipeline.addDebugBlip(objectp->getPositionAgent(), color);
}
+
+ // Do the kill
+ gObjectList.killObject(objectp);
+ }
+
+ if(delete_object)
+ {
+ regionp->killCacheEntry(local_id);
}
// We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab,
// which is using the object, release the mouse capture correctly when the object dies.
// See LLToolGrab::handleHoverActive() and LLToolGrab::handleHoverNonPhysical().
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
-
}
}
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index f3552e2c2b..5b2214f3b3 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -107,7 +107,6 @@ LLViewerObjectList::LLViewerObjectList()
mNumNewObjects = 0;
mWasPaused = FALSE;
mNumDeadObjectUpdates = 0;
- mNumUnknownKills = 0;
mNumUnknownUpdates = 0;
}
@@ -1342,16 +1341,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
if (objectp)
{
- if (objectp->isDead())
- {
- // This object is already dead. Don't need to do more.
- return TRUE;
- }
- else
- {
- objectp->markDead();
- }
-
+ objectp->markDead(); // does the right thing if object already dead
return TRUE;
}
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 17c8c86ff5..3b26df7de6 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -191,7 +191,6 @@ public:
S32 mNumUnknownUpdates;
S32 mNumDeadObjectUpdates;
- S32 mNumUnknownKills;
S32 mNumDeadObjects;
protected:
std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects