Skip to content

Commit f9d64a4

Browse files
authored
Merge pull request #907 from Csantucci/fix-disappearing-dynamic-tracks
Bug fix for https://bugs.launchpad.net/or/+bug/2047300 Dynamic tracks disappear after long tunnel
2 parents 2caa821 + 9b0b04f commit f9d64a4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Source/RunActivity/Viewer3D/DynamicTrack.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,16 @@ public static PitchControls GetPitchControl(string sPitchControl)
707707

708708
}
709709
}
710+
711+
/// <summary>
712+
/// Marks the generic track profile, so that its textures never get deleted
713+
/// </summary>
714+
[CallOnThread("Loader")]
715+
public void Mark()
716+
{
717+
foreach (LOD lod in LODs)
718+
lod.Mark();
719+
}
710720
}
711721

712722
public class LOD

Source/RunActivity/Viewer3D/World.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public void Load()
116116
Precipitation.Mark();
117117
Terrain.Mark();
118118
Scenery.Mark();
119+
Viewer.TRP?.TrackProfile?.Mark();
119120
Trains.Mark();
120121
RoadCars.Mark();
121122
Containers.Mark();

0 commit comments

Comments
 (0)