Load debug symbols for mods if they are loaded from the filesystem
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
@@ -54,7 +55,14 @@ namespace OpenRA
|
|||||||
Assembly assembly;
|
Assembly assembly;
|
||||||
if (!ResolvedAssemblies.TryGetValue(hash, out assembly))
|
if (!ResolvedAssemblies.TryGetValue(hash, out assembly))
|
||||||
{
|
{
|
||||||
|
using (Stream stream = modFiles.Open(path))
|
||||||
|
{
|
||||||
|
if (stream.GetType() == typeof(FileStream))
|
||||||
|
assembly = Assembly.LoadFile(((FileStream)stream).Name);
|
||||||
|
else
|
||||||
assembly = Assembly.Load(data);
|
assembly = Assembly.Load(data);
|
||||||
|
}
|
||||||
|
|
||||||
ResolvedAssemblies.Add(hash, assembly);
|
ResolvedAssemblies.Add(hash, assembly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user