Skip to content

Commit 3dbd52d

Browse files
authored
Merge pull request #64 from Csantucci/add-log-message
Adding log message and comment to pull request #63 https://bugs.launchpad.net/or/+bug/1830498
2 parents 315e366 + 7f43d5f commit 3dbd52d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Source/RunActivity/Viewer3D/Materials.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,14 @@ public Texture2D Get(string path, Texture2D defaultTexture, bool required = fals
7272
DDSLib.DDSFromFile(path, GraphicsDevice, true, out texture);
7373
}
7474
else
75+
// This solves the case where the global shapes have been overwritten and point to .dds textures
76+
// therefore avoiding that routes providing .ace textures show blank global shapes
7577
{
7678
var aceTexture = Path.ChangeExtension(path, ".ace");
7779
if (File.Exists(aceTexture))
7880
{
7981
texture = Orts.Formats.Msts.AceFile.Texture2DFromFile(GraphicsDevice, aceTexture);
82+
Trace.TraceWarning("Required texture {1} not existing; using existing texture {2}", path, aceTexture);
8083
}
8184
else texture = defaultTexture;
8285
}

0 commit comments

Comments
 (0)