From 3e74b56d329d42f945dc8de4d34b6f228f8a6fa3 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 14 Nov 2023 14:36:19 -0500
Subject: [PATCH] Fix new effect particle to not break other particles

---
 indra/newview/llviewerpartsource.cpp  | 6 +++---
 indra/newview/llviewertexture.cpp     | 2 ++
 indra/newview/llviewertexture.h       | 1 +
 indra/newview/llviewertexturelist.cpp | 5 ++++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 3eaca1969f8..95595b5e4dc 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -626,7 +626,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
 {
 	if (!mImagep)
 	{
-		mImagep = LLViewerFetchedTexture::sPixieSmallImagep;
+		mImagep = LLViewerFetchedTexture::sPixieEffectImagep;
 	}
 
 	const F32 RATE = 0.025f;
@@ -799,7 +799,7 @@ void LLViewerPartSourceBeam::update(const F32 dt)
 
 		if (!mImagep)
 		{
-			mImagep = LLViewerFetchedTexture::sPixieSmallImagep;
+			mImagep = LLViewerFetchedTexture::sPixieEffectImagep;
 		}
 
 		LLViewerPart* part = new LLViewerPart();
@@ -886,7 +886,7 @@ void LLViewerPartSourceChat::update(const F32 dt)
 {
 	if (!mImagep)
 	{
-		mImagep = LLViewerFetchedTexture::sPixieSmallImagep;
+		mImagep = LLViewerFetchedTexture::sPixieEffectImagep;
 	}
 
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 97148fcbfe9..6159bbf8f66 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -82,6 +82,7 @@ LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = NULL;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = NULL;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultIrradiancePBRp;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sPixieSmallImagep = NULL;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sPixieEffectImagep = NULL;
 // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultDiffuseImagep = NULL;
 // [/SL:KB]
@@ -461,6 +462,7 @@ void LLViewerTextureManager::cleanup()
 	LLViewerFetchedTexture::sFlatNormalImagep = NULL;
 	LLViewerFetchedTexture::sDefaultIrradiancePBRp = NULL;
 	LLViewerFetchedTexture::sPixieSmallImagep = NULL;
+	LLViewerFetchedTexture::sPixieEffectImagep = NULL;
 	LLViewerFetchedTexture::sDefaultDiffuseImagep = NULL;
 
 	LLViewerMediaTexture::cleanUpClass();	
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 7622f9ad22a..64977be82ca 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -538,6 +538,7 @@ class LLViewerFetchedTexture : public LLViewerTexture
     static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture
     static LLViewerFetchedTexture* getSmokeImage();
 	static LLPointer<LLViewerFetchedTexture> sPixieSmallImagep; // Small pixmap for default particle tex
+	static LLPointer<LLViewerFetchedTexture> sPixieEffectImagep; // Small pixmap for default particle tex
 // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
 	static LLPointer<LLViewerFetchedTexture> sDefaultDiffuseImagep;
 // [/SL:KB]
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 00b72a4e32a..5a4fae1edcf 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -127,7 +127,10 @@ void LLViewerTextureList::doPreloadImages()
 	LLViewerFetchedTexture::sDefaultIrradiancePBRp = LLViewerTextureManager::getFetchedTextureFromFile("default_irradiance.png", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
 	
 	// Set the default particle image
-	LLViewerFetchedTexture::sPixieSmallImagep = LLViewerTextureManager::getFetchedTextureFromFile("PixieSmall.png", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
+	LLViewerFetchedTexture::sPixieSmallImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
+
+	// Set the default particle image
+	LLViewerFetchedTexture::sPixieEffectImagep = LLViewerTextureManager::getFetchedTextureFromFile("PixieSmall.png", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
 
 	image_list->initFromFile();
 	
-- 
GitLab