LLVOCache class implemented.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "llviewerstats.h"
|
||||
#include "llvlcomposition.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llvocache.h"
|
||||
#include "llvowater.h"
|
||||
#include "message.h"
|
||||
#include "pipeline.h"
|
||||
@@ -129,6 +130,10 @@ void LLWorld::destroyClass()
|
||||
LLViewerRegion* region_to_delete = *region_it++;
|
||||
removeRegion(region_to_delete->getHost());
|
||||
}
|
||||
if(LLVOCache::hasInstance())
|
||||
{
|
||||
LLVOCache::getInstance()->destroyClass() ;
|
||||
}
|
||||
LLViewerPartSim::getInstance()->destroyClass();
|
||||
}
|
||||
|
||||
@@ -265,6 +270,7 @@ void LLWorld::removeRegion(const LLHost &host)
|
||||
llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl;
|
||||
LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in.");
|
||||
|
||||
regionp->saveObjectCache() ; //force to save objects here in case that the object cache is about to be destroyed.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -279,6 +285,10 @@ void LLWorld::removeRegion(const LLHost &host)
|
||||
delete regionp;
|
||||
|
||||
updateWaterObjects();
|
||||
|
||||
//double check all objects of this region are removed.
|
||||
gObjectList.clearAllMapObjectsInRegion(regionp) ;
|
||||
//llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1386,17 +1396,17 @@ void send_agent_resume()
|
||||
LLAppViewer::instance()->resumeMainloopTimeout();
|
||||
}
|
||||
|
||||
static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
|
||||
{
|
||||
LLVector3d pos_global(region_origin);
|
||||
LLVector3d pos_local;
|
||||
|
||||
pos_local.mdV[VZ] = (compact_local & 0xFFU) * 4;
|
||||
pos_local.mdV[VY] = (compact_local >> 8) & 0xFFU;
|
||||
pos_local.mdV[VX] = (compact_local >> 16) & 0xFFU;
|
||||
|
||||
pos_global += pos_local;
|
||||
return pos_global;
|
||||
static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
|
||||
{
|
||||
LLVector3d pos_global(region_origin);
|
||||
LLVector3d pos_local;
|
||||
|
||||
pos_local.mdV[VZ] = (compact_local & 0xFFU) * 4;
|
||||
pos_local.mdV[VY] = (compact_local >> 8) & 0xFFU;
|
||||
pos_local.mdV[VX] = (compact_local >> 16) & 0xFFU;
|
||||
|
||||
pos_global += pos_local;
|
||||
return pos_global;
|
||||
}
|
||||
|
||||
void LLWorld::getAvatars(std::vector<LLUUID>* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const
|
||||
|
||||
Reference in New Issue
Block a user