Skip to content

Commit b6c197f

Browse files
committed
Eliminate unneeded error messages for particle textures
1 parent 08776c8 commit b6c197f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Source/RunActivity/Viewer3D/ParticleEmitter.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,18 @@ public void Initialize(string defaultTextureName)
9595

9696
// Texture location preference is eng/wag folder -> MSTS GLOBAL\TEXTURES folder -> OR CONTENT folder
9797
// File type agnostic: We should detect a match if a .ace OR .dds is present, regardless of the specific file type requested
98-
// We give the material manager the path to the .dds file, but it will automatically load the .ace file if the .dds is missing
99-
if (File.Exists(wagPath + ".dds") || File.Exists(wagPath + ".ace"))
98+
if (File.Exists(wagPath + ".dds"))
10099
TexturePath = wagPath + ".dds";
101-
else if (File.Exists(globalPath + ".dds") || File.Exists(globalPath + ".ace"))
100+
else if (File.Exists(wagPath + ".ace"))
101+
TexturePath = wagPath + ".ace";
102+
else if (File.Exists(globalPath + ".dds"))
102103
TexturePath = globalPath + ".dds";
103-
else if (File.Exists(contentPath + ".dds") || File.Exists(contentPath + ".ace"))
104+
else if (File.Exists(globalPath + ".ace"))
105+
TexturePath = globalPath + ".ace";
106+
else if (File.Exists(contentPath + ".dds"))
104107
TexturePath = contentPath + ".dds";
108+
else if (File.Exists(contentPath + ".ace"))
109+
TexturePath = contentPath + ".ace";
105110
else // Fall back to default texture in CONTENT folder
106111
{
107112
TexturePath = Path.Combine(Viewer.ContentPath, defaultTextureName);

0 commit comments

Comments
 (0)