Skip to content

Commit c3f5c55

Browse files
committed
Bug fix for https://bugs.launchpad.net/or/+bug/1999253 Night .dds texture not loaded
1 parent 5f2ded5 commit c3f5c55

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)