mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Skin Fixer: Switch to a passive approach.
Do not load skin.shpk for ourselves as it causes a race condition. Instead, inspect the materials' ShPk names.
This commit is contained in:
parent
94a0a3902c
commit
32608ea45b
7 changed files with 126 additions and 95 deletions
|
|
@ -16,9 +16,6 @@ public sealed class CreatedCharacterBase : EventWrapper<Action<nint, ModCollecti
|
|||
{
|
||||
/// <seealso cref="PenumbraApi.CreatedCharacterBase"/>
|
||||
Api = int.MinValue,
|
||||
|
||||
/// <seealso cref="Interop.Services.SkinFixer.OnCharacterBaseCreated"/>
|
||||
SkinFixer = 0,
|
||||
}
|
||||
|
||||
public CreatedCharacterBase()
|
||||
|
|
|
|||
24
Penumbra/Communication/MtrlShpkLoaded.cs
Normal file
24
Penumbra/Communication/MtrlShpkLoaded.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using OtterGui.Classes;
|
||||
|
||||
namespace Penumbra.Communication;
|
||||
|
||||
/// <summary> <list type="number">
|
||||
/// <item>Parameter is the material resource handle for which the shader package has been loaded. </item>
|
||||
/// <item>Parameter is the associated game object. </item>
|
||||
/// </list> </summary>
|
||||
public sealed class MtrlShpkLoaded : EventWrapper<Action<nint, nint>, MtrlShpkLoaded.Priority>
|
||||
{
|
||||
public enum Priority
|
||||
{
|
||||
/// <seealso cref="Interop.Services.SkinFixer.OnMtrlShpkLoaded"/>
|
||||
SkinFixer = 0,
|
||||
}
|
||||
|
||||
public MtrlShpkLoaded()
|
||||
: base(nameof(MtrlShpkLoaded))
|
||||
{ }
|
||||
|
||||
public void Invoke(nint mtrlResourceHandle, nint gameObject)
|
||||
=> Invoke(this, mtrlResourceHandle, gameObject);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue