mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix a bug with RSP changes on non-base collections.
This commit is contained in:
parent
7033b65d33
commit
7a09d561e9
2 changed files with 11 additions and 8 deletions
|
|
@ -144,10 +144,8 @@ public unsafe partial class PathResolver
|
|||
_lastCreatedCollection = IdentifyCollection( LastGameObject, false );
|
||||
// Change the transparent or 1.0 Decal if necessary.
|
||||
var decal = new CharacterUtility.DecalReverter( _lastCreatedCollection.ModCollection, UsesDecal( a, c ) );
|
||||
// Change the rsp parameters if necessary.
|
||||
meta = new DisposableContainer( _lastCreatedCollection.ModCollection != Penumbra.CollectionManager.Default
|
||||
? _lastCreatedCollection.ModCollection.TemporarilySetCmpFile()
|
||||
: null, decal );
|
||||
// Change the rsp parameters.
|
||||
meta = new DisposableContainer( _lastCreatedCollection.ModCollection.TemporarilySetCmpFile(), decal );
|
||||
try
|
||||
{
|
||||
var modelPtr = &a;
|
||||
|
|
@ -160,16 +158,19 @@ public unsafe partial class PathResolver
|
|||
}
|
||||
|
||||
var ret = _characterBaseCreateHook.Original( a, b, c, d );
|
||||
using( meta )
|
||||
try
|
||||
{
|
||||
if( LastGameObject != null && ret != IntPtr.Zero )
|
||||
{
|
||||
_drawObjectToObject[ ret ] = ( _lastCreatedCollection!, LastGameObject->ObjectIndex );
|
||||
CreatedCharacterBase?.Invoke( ( IntPtr )LastGameObject, _lastCreatedCollection!.ModCollection.Name, ret );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
finally
|
||||
{
|
||||
meta.Dispose();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Check the customize array for the FaceCustomization byte and the last bit of that.
|
||||
|
|
|
|||
|
|
@ -188,7 +188,9 @@ public unsafe partial class PathResolver
|
|||
var resolveData = GetResolveData( human );
|
||||
using var cmp = resolveData.ModCollection.TemporarilySetCmpFile();
|
||||
using var decals = new CharacterUtility.DecalReverter( resolveData.ModCollection, DrawObjectState.UsesDecal( 0, data ) );
|
||||
return _changeCustomize.Original( human, data, skipEquipment );
|
||||
var ret = _changeCustomize.Original( human, data, skipEquipment );
|
||||
_inChangeCustomize = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static DisposableContainer ResolveEqdpData( ModCollection collection, GenderRace race, bool equipment, bool accessory )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue