Skip to content

Commit 6cf0e64

Browse files
authored
Merge pull request #756 from Csantucci/fix-night-dds-not-loaded
Bug fix for https://bugs.launchpad.net/or/+bug/1999253 Night .dds textures not loaded
2 parents 02e149c + c3f5c55 commit 6cf0e64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/RunActivity/Viewer3D/Common/Helpers.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public static string GetNightTextureFile(Simulator simulator, string textureFile
5151
{
5252
var texturePath = Path.GetDirectoryName(textureFilePath);
5353
var textureName = Path.GetFileName(textureFilePath);
54-
var nightTexturePath = !File.Exists(texturePath + @"\Night\" + textureName) ? Path.GetDirectoryName(texturePath) + @"\Night\" : texturePath + @"\Night\";
54+
var nightTexturePath = !File.Exists(texturePath + @"\Night\" + textureName) &&
55+
!File.Exists(texturePath + @"\Night\" + Path.ChangeExtension(textureName, ".dds")) ? Path.GetDirectoryName(texturePath) + @"\Night\" : texturePath + @"\Night\";
5556

5657
if (!String.IsNullOrEmpty(nightTexturePath + textureName) && Path.GetExtension(nightTexturePath + textureName) == ".dds" && File.Exists(nightTexturePath + textureName))
5758
{

0 commit comments

Comments
 (0)