Skip to content

Commit 1614f89

Browse files
authored
Delay initializing map file watcher until custom map has been loaded (CnCNet#984)
1 parent 1f60251 commit 1614f89

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

DXMainClient/Domain/Multiplayer/MapLoader.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,15 @@ public class MapLoader : IDisposable
9090

9191
public MapLoader() { }
9292

93+
public void Initialize()
94+
{
95+
MapLoadingComplete += (sender, args) => StartMapFileWatcher();
96+
}
97+
9398
/// <summary>
9499
/// Sets up file watching for maps.
95100
/// </summary>
96-
public void Initialize()
101+
public void StartMapFileWatcher()
97102
{
98103
if (mapFileWatcher != null)
99104
return;

0 commit comments

Comments
 (0)