Compare commits

..

2 Commits

7 changed files with 42 additions and 11 deletions

View File

@@ -752,7 +752,7 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
{
if (child->getListenerCount() == 0)
{
new LLSpatialGroup(child, getSpatialPartition());
LLPointer<LLSpatialGroup> tmp = new LLSpatialGroup(child, getSpatialPartition());
}
else
{
@@ -817,7 +817,7 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
mSlopRatio = 0.25f;
mInfiniteFarClip = FALSE;
new LLSpatialGroup(mOctree, this);
LLPointer<LLSpatialGroup> tmp = new LLSpatialGroup(mOctree, this);
}

View File

@@ -116,7 +116,7 @@ public:
BOOL mParticle;
F32 mPartSize;
F32 mVSize;
LLSpatialGroup* mGroup;
LLPointer<LLSpatialGroup> mGroup;
LL_ALIGN_16(LLFace* mFace); //associated face
F32 mDistance;
U32 mDrawMode;
@@ -478,7 +478,7 @@ class LLCullResult
public:
LLCullResult() {}
typedef std::vector<LLSpatialGroup*> sg_list_t;
typedef std::vector<LLPointer<LLSpatialGroup> > sg_list_t;
typedef std::vector<LLDrawable*> drawable_list_t;
typedef std::vector<LLSpatialBridge*> bridge_list_t;
typedef std::vector<LLDrawInfo*> drawinfo_list_t;

View File

@@ -272,11 +272,10 @@ void LLViewerOctreeEntry::removeData(LLViewerOctreeEntryData* data)
mData[data->getDataType()] = NULL;
if(mGroup != NULL && !mData[LLDRAWABLE])
if(!mGroup.isNull() && !mData[LLDRAWABLE])
{
LLViewerOctreeGroup* group = mGroup;
mGroup->removeFromGroup(data);
mGroup = NULL;
group->removeFromGroup(data);
llassert(mBinIndex == -1);
}

View File

@@ -109,7 +109,7 @@ private:
private:
LLViewerOctreeEntryData* mData[NUM_DATA_TYPE]; //do not use LLPointer here.
LLViewerOctreeGroup* mGroup;
LLPointer<LLViewerOctreeGroup> mGroup;
//aligned members
LL_ALIGN_16(LLVector4a mExtents[2]);
@@ -229,6 +229,7 @@ public:
void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child) final override;
OctreeNode* getOctreeNode() {return mOctreeNode;}
const OctreeNode* getOctreeNode() const { return mOctreeNode; }
LLViewerOctreeGroup* getParent();
const LLVector4a* getBounds() const {return mBounds;}

View File

@@ -107,6 +107,19 @@ typedef std::map<std::string, std::string> CapabilityMap;
static void log_capabilities(const CapabilityMap &capmap);
namespace
{
void newRegionEntry(LLViewerRegion& region)
{
LL_INFOS("LLViewerRegion") << "Entering region [" << region.getName() << "]" << LL_ENDL;
gDebugInfo["CurrentRegion"] = region.getName();
LLAppViewer::instance()->writeDebugInfo();
}
} // anonymous namespace
class LLViewerRegionImpl {
public:
LLViewerRegionImpl(LLViewerRegion * region, LLHost const & host)
@@ -117,6 +130,7 @@ public:
mSeedCapMaxAttemptsBeforeLogin(MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN),
mSeedCapAttempts(0),
mHttpResponderID(0),
mLandp(NULL),
// I'd prefer to set the LLCapabilityListener name to match the region
// name -- it's disappointing that's not available at construction time.
// We could instead store an LLCapabilityListener*, making
@@ -2090,6 +2104,9 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
LL_DEBUGS("CrossingCaps") << "Received duplicate seed capability, posting to seed " <<
url << LL_ENDL;
// record that we just entered a new region
newRegionEntry(*this);
//Instead of just returning we build up a second set of seed caps and compare them
//to the "original" seed cap received and determine why there is problem!
LLSD capabilityNames = LLSD::emptyArray();
@@ -2104,6 +2121,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
mImpl->mCapabilities.clear();
setCapability("Seed", url);
// record that we just entered a new region
newRegionEntry(*this);
LLSD capabilityNames = LLSD::emptyArray();
mImpl->buildCapabilityNames(capabilityNames);

View File

@@ -172,6 +172,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
{
LL_INFOS() << "Add region with handle: " << region_handle << " on host " << host << LL_ENDL;
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
std::string seedUrl;
if (regionp)
{
LLHost old_host = regionp->getHost();
@@ -191,9 +192,12 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
}
if (!regionp->isAlive())
{
LL_WARNS() << "LLWorld::addRegion exists, but isn't alive" << LL_ENDL;
LL_WARNS() << "LLWorld::addRegion exists, but isn't alive. Removing old region and creating new" << LL_ENDL;
}
// Save capabilities seed URL
seedUrl = regionp->getCapability("Seed");
// Kill the old host, and then we can continue on and add the new host. We have to kill even if the host
// matches, because all the agent state for the new camera is completely different.
removeRegion(old_host);
@@ -229,6 +233,11 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
LL_ERRS() << "Unable to create new region!" << LL_ENDL;
}
if ( !seedUrl.empty() )
{
regionp->setCapability("Seed", seedUrl);
}
//Classic clouds
#if ENABLE_CLASSIC_CLOUDS
regionp->mCloudLayer.create(regionp);
@@ -1447,6 +1456,8 @@ public:
<< sim << LL_ENDL;
return;
}
LL_DEBUGS("CrossingCaps") << "Calling setSeedCapability from LLEstablishAgentCommunication::post. Seed cap == "
<< input["body"]["seed-capability"] << LL_ENDL;
regionp->setSeedCapability(input["body"]["seed-capability"]);
}
};

View File

@@ -3459,8 +3459,9 @@ void forAllDrawables(LLCullResult::sg_iterator begin,
{
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
{
OctreeGuard guard((*i)->getOctreeNode());
for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j)
LLSpatialGroup* group = (*i).get();
OctreeGuard guard(group->getOctreeNode());
for (LLSpatialGroup::element_iter j = group->getDataBegin(); j != group->getDataEnd(); ++j)
{
func((LLDrawable*)(*j)->getDrawable());
}