Make this option work when applying automation.

This commit is contained in:
Ottermandias 2024-05-05 15:40:04 +02:00
parent 2713e6f1f6
commit 6efd89e0ab
7 changed files with 35 additions and 32 deletions

View file

@ -402,18 +402,18 @@ public sealed class StateManager(
}
}
public void ReapplyState(Actor actor, StateSource source)
public void ReapplyState(Actor actor, bool forceRedraw, StateSource source)
{
if (!GetOrCreate(actor, out var state))
return;
ReapplyState(actor, state, source);
ReapplyState(actor, state, forceRedraw, source);
}
public void ReapplyState(Actor actor, ActorState state, StateSource source)
public void ReapplyState(Actor actor, ActorState state, bool forceRedraw, StateSource source)
{
var data = Applier.ApplyAll(state,
!actor.Model.IsHuman || CustomizeArray.Compare(actor.Model.GetCustomize(), state.ModelData.Customize).RequiresRedraw(), false);
forceRedraw || !actor.Model.IsHuman || CustomizeArray.Compare(actor.Model.GetCustomize(), state.ModelData.Customize).RequiresRedraw(), false);
StateChanged.Invoke(StateChanged.Type.Reapply, source, state, data, null);
}