resolve material issues

This commit is contained in:
Stanley Dimant
2022-09-13 23:10:44 +02:00
parent 78c6d7e594
commit b4792138ae
4 changed files with 14 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ namespace MareSynchronos.Managers
public event TransientResourceLoadedEvent? TransientResourceLoaded;
public IntPtr[] PlayerRelatedPointers = Array.Empty<IntPtr>();
private readonly string[] FileTypesToHandle = new[] { "tmb", "pap", "avfx", "atex", "sklb", "eid", "phyb", "scd", "skp" };
private ConcurrentDictionary<IntPtr, HashSet<string>> TransientResources { get; } = new();
private ConcurrentDictionary<ObjectKind, HashSet<FileReplacement>> SemiTransientResources { get; } = new();
@@ -81,6 +82,10 @@ namespace MareSynchronos.Managers
private void Manager_PenumbraResourceLoadEvent(IntPtr gameObject, string gamePath, string filePath)
{
if (!FileTypesToHandle.Any(type => gamePath.ToLowerInvariant().EndsWith(type)))
{
return;
}
if (!PlayerRelatedPointers.Contains(gameObject))
{
return;