Merge branch 'master' of git://github.com/Shyotl/SingularityViewer
This commit is contained in:
@@ -4832,11 +4832,14 @@ void LLAppViewer::disconnectViewer()
|
||||
// floater_sound_preview.xml
|
||||
// floater_animation_preview.xml
|
||||
// files.
|
||||
|
||||
// A more generic mechanism would be nice..
|
||||
LLFloater* fl = static_cast<LLFloater*>(*it);
|
||||
if (fl
|
||||
&& (fl->getName() == "Image Preview"
|
||||
|| fl->getName() == "Sound Preview"
|
||||
|| fl->getName() == "Animation Preview"
|
||||
|| fl->getName() == "perm prefs"
|
||||
))
|
||||
{
|
||||
floaters_to_close.push_back(fl);
|
||||
|
||||
@@ -493,21 +493,10 @@ void LLSurface::disconnectNeighbor(LLSurface* surfacep, U32 direction)
|
||||
{
|
||||
if (surfacep && surfacep == mNeighbors[direction])
|
||||
{
|
||||
// Iterate through surface patches, removing any connectivity to removed surface.
|
||||
// Extra branches for debugging.
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
mNeighbors[direction] = NULL;
|
||||
for (auto& patchp : mPatchList)
|
||||
{
|
||||
for (auto& patchp : mPatchList)
|
||||
{
|
||||
patchp->disconnectNeighbor(surfacep);
|
||||
}
|
||||
}
|
||||
if (gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
{
|
||||
for (auto& patchp : mPatchList)
|
||||
{
|
||||
patchp->disconnectNeighbor(surfacep);
|
||||
}
|
||||
patchp->disconnectNeighbor(surfacep);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -515,46 +504,13 @@ void LLSurface::disconnectNeighbor(LLSurface* surfacep, U32 direction)
|
||||
|
||||
void LLSurface::disconnectAllNeighbors()
|
||||
{
|
||||
// Pulled out of loop to debug.
|
||||
if (mNeighbors[EAST])
|
||||
for (size_t i = 0; i < mNeighbors.size(); ++i)
|
||||
{
|
||||
mNeighbors[EAST]->disconnectNeighbor(this, gDirOpposite[EAST]);
|
||||
}
|
||||
if (mNeighbors[NORTH])
|
||||
{
|
||||
mNeighbors[NORTH]->disconnectNeighbor(this, gDirOpposite[NORTH]);
|
||||
}
|
||||
if (mNeighbors[WEST])
|
||||
{
|
||||
mNeighbors[WEST]->disconnectNeighbor(this, gDirOpposite[WEST]);
|
||||
}
|
||||
if (mNeighbors[SOUTH])
|
||||
{
|
||||
mNeighbors[SOUTH]->disconnectNeighbor(this, gDirOpposite[SOUTH]);
|
||||
}
|
||||
if (mNeighbors[NORTHEAST])
|
||||
{
|
||||
mNeighbors[NORTHEAST]->disconnectNeighbor(this, gDirOpposite[NORTHEAST]);
|
||||
}
|
||||
if (mNeighbors[NORTHWEST])
|
||||
{
|
||||
mNeighbors[NORTHWEST]->disconnectNeighbor(this, gDirOpposite[NORTHWEST]);
|
||||
}
|
||||
if (mNeighbors[SOUTHWEST])
|
||||
{
|
||||
mNeighbors[SOUTHWEST]->disconnectNeighbor(this, gDirOpposite[SOUTHWEST]);
|
||||
}
|
||||
if (mNeighbors[SOUTHEAST])
|
||||
{
|
||||
mNeighbors[SOUTHEAST]->disconnectNeighbor(this, gDirOpposite[SOUTHEAST]);
|
||||
}
|
||||
S32 i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (mNeighbors[i])
|
||||
auto& neighbor = mNeighbors[i];
|
||||
if (neighbor)
|
||||
{
|
||||
//mNeighbors[i]->disconnectNeighbor(this);
|
||||
mNeighbors[i] = NULL;
|
||||
neighbor->disconnectNeighbor(this, gDirOpposite[i]);
|
||||
neighbor = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
// +---+---+---+
|
||||
// |SW | S | SE|
|
||||
// +---+---+---+
|
||||
LLSurface *mNeighbors[8]; // Adjacent patches
|
||||
std::array<LLSurface*, 8> mNeighbors; // Adjacent patches
|
||||
|
||||
U32 mType; // Useful for identifying derived classes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user