Test disabling MtrlForceSync.

This commit is contained in:
Ottermandias 2025-01-25 13:55:13 +01:00
parent 30a957356a
commit 4d26a63944

View file

@ -256,7 +256,6 @@ public unsafe class ResourceLoader : IDisposable, IService
gamePath.Path.IsAscii); gamePath.Path.IsAscii);
fileDescriptor->ResourceHandle->FileNameData = path.Path; fileDescriptor->ResourceHandle->FileNameData = path.Path;
fileDescriptor->ResourceHandle->FileNameLength = path.Length; fileDescriptor->ResourceHandle->FileNameLength = path.Length;
MtrlForceSync(fileDescriptor, ref isSync);
returnValue = DefaultLoadResource(path, fileDescriptor, priority, isSync, data); returnValue = DefaultLoadResource(path, fileDescriptor, priority, isSync, data);
// Return original resource handle path so that they can be loaded separately. // Return original resource handle path so that they can be loaded separately.
fileDescriptor->ResourceHandle->FileNameData = gamePath.Path.Path; fileDescriptor->ResourceHandle->FileNameData = gamePath.Path.Path;
@ -295,16 +294,6 @@ public unsafe class ResourceLoader : IDisposable, IService
} }
} }
/// <summary> Special handling for materials. </summary>
private static void MtrlForceSync(SeFileDescriptor* fileDescriptor, ref bool isSync)
{
// Force isSync = true for Materials. I don't really understand why,
// or where the difference even comes from.
// Was called with True on my client and with false on other peoples clients,
// which caused problems.
isSync |= fileDescriptor->ResourceHandle->FileType is ResourceType.Mtrl;
}
/// <summary> /// <summary>
/// A resource with ref count 0 that gets incremented goes through GetResourceAsync again. /// A resource with ref count 0 that gets incremented goes through GetResourceAsync again.
/// This means, that if the path determined from that is different than the resources path, /// This means, that if the path determined from that is different than the resources path,