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:
@@ -1014,7 +1014,7 @@ public:
|
||||
}
|
||||
|
||||
LLVector4a MAX_MAG;
|
||||
MAX_MAG.splat(2048.f * 2048.f); // Singu note: SVC-2941 FIRE-11593 (original range was 1024 * 1024)
|
||||
MAX_MAG.splat(1024.f * 1024.f);
|
||||
|
||||
const LLVector4a& v = data->getPositionGroup();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -338,7 +338,11 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
||||
|
||||
// Create the object lists
|
||||
initStats();
|
||||
initPartitions();
|
||||
}
|
||||
|
||||
void LLViewerRegion::initPartitions()
|
||||
{
|
||||
//create object partitions
|
||||
//MUST MATCH declaration of eObjectPartitions
|
||||
mImpl->mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD
|
||||
@@ -357,6 +361,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
||||
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
|
||||
}
|
||||
|
||||
void LLViewerRegion::reInitPartitions()
|
||||
{
|
||||
std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer());
|
||||
mImpl->mObjectPartition.clear();
|
||||
initPartitions();
|
||||
}
|
||||
|
||||
void LLViewerRegion::initStats()
|
||||
{
|
||||
|
||||
@@ -369,10 +369,12 @@ public:
|
||||
};
|
||||
|
||||
void showReleaseNotes();
|
||||
void reInitPartitions();
|
||||
|
||||
protected:
|
||||
void disconnectAllNeighbors();
|
||||
void initStats();
|
||||
void initPartitions();
|
||||
|
||||
public:
|
||||
LLWind mWind;
|
||||
|
||||
Reference in New Issue
Block a user