mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Redraw mounts when redrawing actors.
This commit is contained in:
parent
9dee0862cc
commit
f1d9757077
1 changed files with 25 additions and 2 deletions
|
|
@ -2,6 +2,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Penumbra.Api;
|
||||
using Penumbra.GameData.Enums;
|
||||
|
|
@ -129,10 +131,20 @@ public sealed unsafe partial class ObjectReloader : IDisposable
|
|||
|
||||
*ActorDrawState( actor! ) |= DrawState.Invisibility;
|
||||
|
||||
if( IsGPoseActor( tableIndex ) )
|
||||
var gPose = IsGPoseActor( tableIndex );
|
||||
if( gPose )
|
||||
{
|
||||
DisableDraw( actor! );
|
||||
}
|
||||
|
||||
if( actor is PlayerCharacter && Dalamud.Objects[ tableIndex + 1 ] is { ObjectKind: ObjectKind.MountType } mount )
|
||||
{
|
||||
*ActorDrawState( mount ) |= DrawState.Invisibility;
|
||||
if( gPose )
|
||||
{
|
||||
DisableDraw( mount );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteVisible( GameObject? actor )
|
||||
|
|
@ -143,11 +155,22 @@ public sealed unsafe partial class ObjectReloader : IDisposable
|
|||
}
|
||||
|
||||
*ActorDrawState( actor! ) &= ~DrawState.Invisibility;
|
||||
if( IsGPoseActor( tableIndex ) )
|
||||
|
||||
var gPose = IsGPoseActor( tableIndex );
|
||||
if( gPose )
|
||||
{
|
||||
EnableDraw( actor! );
|
||||
}
|
||||
|
||||
if( actor is PlayerCharacter && Dalamud.Objects[ tableIndex + 1 ] is { ObjectKind: ObjectKind.MountType } mount )
|
||||
{
|
||||
*ActorDrawState( mount ) &= ~DrawState.Invisibility;
|
||||
if( gPose )
|
||||
{
|
||||
EnableDraw( mount );
|
||||
}
|
||||
}
|
||||
|
||||
GameObjectRedrawn?.Invoke( actor!.Address, tableIndex );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue