Merge branch 'Fire-30873-NewPoser' of https://github.com/AngeldarkRaymaker/phoenix-firestorm into Fire-30873-NewPoser

master
Angeldark Raymaker 2024-10-11 21:40:26 +01:00
commit a0803a2aa9
2 changed files with 18 additions and 1 deletions

View File

@ -525,7 +525,7 @@ void LLViewerPartSim::destroyClass()
//static
bool LLViewerPartSim::shouldAddPart()
{
if (sParticleCount < MAX_PART_COUNT)
if (sParticleCount >= MAX_PART_COUNT)
{
return false;
}

View File

@ -2620,6 +2620,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
}
}
if (need_readback)
{
readbackRawImage();
}
//
// Run raw/auxiliary data callbacks
//
@ -2869,10 +2874,22 @@ void LLViewerFetchedTexture::readbackRawImage()
if (mGLTexturep.notNull() && mGLTexturep->getTexName() != 0 &&
(mRawImage.isNull() || mRawImage->getWidth() < mGLTexturep->getWidth() || mRawImage->getHeight() < mGLTexturep->getHeight() ))
{
if (mRawImage.isNull())
{
sRawCount++;
}
mRawImage = new LLImageRaw();
if (!mGLTexturep->readBackRaw(-1, mRawImage, false))
{
mRawImage = nullptr;
mIsRawImageValid = false;
mRawDiscardLevel = INVALID_DISCARD_LEVEL;
sRawCount--;
}
else
{
mIsRawImageValid = true;
mRawDiscardLevel = mGLTexturep->getDiscardLevel();
}
}
}