Added condition checks to ActorRefresher to not trigger reloading on zone changes too early.

This commit is contained in:
Ottermandias 2021-07-24 14:13:16 +02:00
parent 1d3d6dc3af
commit 03a722b92f

View file

@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Actors.Types; using Dalamud.Game.ClientState.Actors.Types;
using Dalamud.Plugin; using Dalamud.Plugin;
using Penumbra.Mods; using Penumbra.Mods;
@ -192,7 +193,6 @@ namespace Penumbra.Interop
{ {
case Redraw.Unload: case Redraw.Unload:
WriteInvisible( actor, idx ); WriteInvisible( actor, idx );
_currentFrame = 0; _currentFrame = 0;
break; break;
case Redraw.RedrawWithSettings: case Redraw.RedrawWithSettings:
@ -258,6 +258,11 @@ namespace Penumbra.Interop
private void OnUpdateEvent( object framework ) private void OnUpdateEvent( object framework )
{ {
if( _pi.ClientState.Condition[ ConditionFlag.BetweenAreas51 ] || _pi.ClientState.Condition[ ConditionFlag.BetweenAreas ] )
{
return;
}
switch( _currentFrame ) switch( _currentFrame )
{ {
case 0: case 0: