Skip to content

Commit

Permalink
Merge pull request #756 from Csantucci/fix-night-dds-not-loaded
Browse files Browse the repository at this point in the history
Bug fix for https://bugs.launchpad.net/or/+bug/1999253 Night .dds textures not loaded
  • Loading branch information
Csantucci committed Dec 22, 2022
2 parents 02e149c + c3f5c55 commit 6cf0e64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/RunActivity/Viewer3D/Common/Helpers.cs
Expand Up @@ -51,7 +51,8 @@ public static string GetNightTextureFile(Simulator simulator, string textureFile
{
var texturePath = Path.GetDirectoryName(textureFilePath);
var textureName = Path.GetFileName(textureFilePath);
var nightTexturePath = !File.Exists(texturePath + @"\Night\" + textureName) ? Path.GetDirectoryName(texturePath) + @"\Night\" : texturePath + @"\Night\";
var nightTexturePath = !File.Exists(texturePath + @"\Night\" + textureName) &&
!File.Exists(texturePath + @"\Night\" + Path.ChangeExtension(textureName, ".dds")) ? Path.GetDirectoryName(texturePath) + @"\Night\" : texturePath + @"\Night\";

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

0 comments on commit 6cf0e64

Please sign in to comment.