mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 21:24:18 +01:00
Disable additional pap handling for now.
This commit is contained in:
parent
2d200bcabb
commit
afb758e61a
3 changed files with 42 additions and 41 deletions
|
|
@ -10,33 +10,33 @@ public unsafe partial class PathResolver
|
||||||
{
|
{
|
||||||
// Probably used when the base idle animation gets loaded.
|
// Probably used when the base idle animation gets loaded.
|
||||||
// Make it aware of the correct collection to load the correct pap files.
|
// Make it aware of the correct collection to load the correct pap files.
|
||||||
[Signature( "E8 ?? ?? ?? ?? BA ?? ?? ?? ?? 48 8B CF 44 8B C2 E8 ?? ?? ?? ?? 48 8B 05", DetourName = "CharacterBaseLoadAnimationDetour" )]
|
//[Signature( "E8 ?? ?? ?? ?? BA ?? ?? ?? ?? 48 8B CF 44 8B C2 E8 ?? ?? ?? ?? 48 8B 05", DetourName = "CharacterBaseLoadAnimationDetour" )]
|
||||||
public Hook< CharacterBaseDestructorDelegate >? CharacterBaseLoadAnimationHook;
|
//public Hook< CharacterBaseDestructorDelegate >? CharacterBaseLoadAnimationHook;
|
||||||
|
//
|
||||||
private ModCollection? _animationLoadCollection;
|
//private ModCollection? _animationLoadCollection;
|
||||||
|
//
|
||||||
private void CharacterBaseLoadAnimationDetour( IntPtr drawObject )
|
//private void CharacterBaseLoadAnimationDetour( IntPtr drawObject )
|
||||||
{
|
//{
|
||||||
_animationLoadCollection = _lastCreatedCollection
|
// _animationLoadCollection = _lastCreatedCollection
|
||||||
?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
// ?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||||
CharacterBaseLoadAnimationHook!.Original( drawObject );
|
// CharacterBaseLoadAnimationHook!.Original( drawObject );
|
||||||
_animationLoadCollection = null;
|
// _animationLoadCollection = null;
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Probably used when action paps are loaded.
|
// Probably used when action paps are loaded.
|
||||||
// Make it aware of the correct collection to load the correct pap files.
|
// Make it aware of the correct collection to load the correct pap files.
|
||||||
public delegate void PapLoadFunction( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 );
|
//public delegate void PapLoadFunction( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 );
|
||||||
|
|
||||||
[Signature( "E8 ?? ?? ?? ?? 0F 10 00 0F 11 06", DetourName = "RandomPapDetour" )]
|
//[Signature( "E8 ?? ?? ?? ?? 0F 10 00 0F 11 06", DetourName = "RandomPapDetour" )]
|
||||||
public Hook< PapLoadFunction >? RandomPapHook;
|
//public Hook< PapLoadFunction >? RandomPapHook;
|
||||||
|
|
||||||
private void RandomPapDetour( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 )
|
//private void RandomPapDetour( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 )
|
||||||
{
|
//{
|
||||||
_animationLoadCollection = _lastCreatedCollection
|
// _animationLoadCollection = _lastCreatedCollection
|
||||||
?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
// ?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||||
RandomPapHook!.Original( drawObject, a2, a3, a4, a5, a6, a7 );
|
// RandomPapHook!.Original( drawObject, a2, a3, a4, a5, a6, a7 );
|
||||||
_animationLoadCollection = null;
|
// _animationLoadCollection = null;
|
||||||
}
|
//}
|
||||||
|
|
||||||
//private void TestFunction()
|
//private void TestFunction()
|
||||||
//{
|
//{
|
||||||
|
|
|
||||||
|
|
@ -72,28 +72,29 @@ public unsafe partial class PathResolver
|
||||||
CharacterBaseCreateHook?.Enable();
|
CharacterBaseCreateHook?.Enable();
|
||||||
EnableDrawHook?.Enable();
|
EnableDrawHook?.Enable();
|
||||||
CharacterBaseDestructorHook?.Enable();
|
CharacterBaseDestructorHook?.Enable();
|
||||||
CharacterBaseLoadAnimationHook?.Enable();
|
|
||||||
RandomPapHook?.Enable();
|
|
||||||
Penumbra.CollectionManager.CollectionChanged += CheckCollections;
|
Penumbra.CollectionManager.CollectionChanged += CheckCollections;
|
||||||
|
//CharacterBaseLoadAnimationHook?.Enable();
|
||||||
|
//RandomPapHook?.Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisableDataHooks()
|
private void DisableDataHooks()
|
||||||
{
|
{
|
||||||
Penumbra.CollectionManager.CollectionChanged -= CheckCollections;
|
Penumbra.CollectionManager.CollectionChanged -= CheckCollections;
|
||||||
RandomPapHook?.Disable();
|
|
||||||
CharacterBaseLoadAnimationHook?.Disable();
|
|
||||||
CharacterBaseCreateHook?.Disable();
|
CharacterBaseCreateHook?.Disable();
|
||||||
EnableDrawHook?.Disable();
|
EnableDrawHook?.Disable();
|
||||||
CharacterBaseDestructorHook?.Disable();
|
CharacterBaseDestructorHook?.Disable();
|
||||||
|
//RandomPapHook?.Disable();
|
||||||
|
//CharacterBaseLoadAnimationHook?.Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisposeDataHooks()
|
private void DisposeDataHooks()
|
||||||
{
|
{
|
||||||
CharacterBaseLoadAnimationHook?.Dispose();
|
|
||||||
CharacterBaseCreateHook?.Dispose();
|
CharacterBaseCreateHook?.Dispose();
|
||||||
EnableDrawHook?.Dispose();
|
EnableDrawHook?.Dispose();
|
||||||
CharacterBaseDestructorHook?.Dispose();
|
CharacterBaseDestructorHook?.Dispose();
|
||||||
RandomPapHook?.Dispose();
|
//RandomPapHook?.Dispose();
|
||||||
|
//CharacterBaseLoadAnimationHook?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This map links DrawObjects directly to Actors (by ObjectTable index) and their collections.
|
// This map links DrawObjects directly to Actors (by ObjectTable index) and their collections.
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public partial class PathResolver : IDisposable
|
||||||
// A potential next request will add the path anew.
|
// A potential next request will add the path anew.
|
||||||
var nonDefault = HandleMaterialSubFiles( type, out var collection )
|
var nonDefault = HandleMaterialSubFiles( type, out var collection )
|
||||||
|| PathCollections.TryRemove( gamePath.Path, out collection )
|
|| PathCollections.TryRemove( gamePath.Path, out collection )
|
||||||
|| HandlePapFile( type, gamePath, out collection )
|
//|| HandlePapFile( type, gamePath, out collection )
|
||||||
|| HandleDecalFile( type, gamePath, out collection );
|
|| HandleDecalFile( type, gamePath, out collection );
|
||||||
if( !nonDefault )
|
if( !nonDefault )
|
||||||
{
|
{
|
||||||
|
|
@ -72,18 +72,18 @@ public partial class PathResolver : IDisposable
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HandlePapFile( ResourceType type, Utf8GamePath _, out ModCollection? collection )
|
//private bool HandlePapFile( ResourceType type, Utf8GamePath _, out ModCollection? collection )
|
||||||
{
|
//{
|
||||||
if( type is ResourceType.Pap or ResourceType.Tmb
|
// if( type is ResourceType.Pap or ResourceType.Tmb
|
||||||
&& _animationLoadCollection != null )
|
// && _animationLoadCollection != null )
|
||||||
{
|
// {
|
||||||
collection = _animationLoadCollection;
|
// collection = _animationLoadCollection;
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
collection = null;
|
// collection = null;
|
||||||
return false;
|
// return false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public void Enable()
|
public void Enable()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue