Re initiate spatial partitions in the main region after a long teleport jump.
Also kill objects in the regions we left behind. Restore max octree range to 1024 * 1024
This commit is contained in:
@@ -4563,6 +4563,21 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
|
||||
gAgent.getRegion()->getOriginGlobal());
|
||||
gAgent.setRegion(regionp);
|
||||
gObjectList.shiftObjects(shift_vector);
|
||||
// Is this a really long jump?
|
||||
if (shift_vector.length() > 2048.f * 256.f)
|
||||
{
|
||||
regionp->reInitPartitions();
|
||||
gAgent.setRegion(regionp);
|
||||
// Kill objects in the regions we left behind
|
||||
for (LLWorld::region_list_t::const_iterator r = LLWorld::getInstance()->getRegionList().begin();
|
||||
r != LLWorld::getInstance()->getRegionList().end(); ++r)
|
||||
{
|
||||
if (*r != regionp)
|
||||
{
|
||||
gObjectList.killObjects(*r);
|
||||
}
|
||||
}
|
||||
}
|
||||
gAssetStorage->setUpstream(msg->getSender());
|
||||
gCacheName->setUpstream(msg->getSender());
|
||||
gViewerThrottle.sendToSim();
|
||||
|
||||
Reference in New Issue
Block a user