Fix redraw.

This commit is contained in:
Ottermandias 2024-02-29 12:23:27 +01:00
parent 1cf0e2f70e
commit 2a01b328e1

View file

@ -95,6 +95,10 @@ public class PenumbraAutoRedraw : IDisposable, IRequiredService
else if (_config.AutoRedrawEquipOnChanges) else if (_config.AutoRedrawEquipOnChanges)
{ {
// Only update once per frame. // Only update once per frame.
var playerName = _penumbra.GetCurrentPlayerCollection();
if (playerName == name)
return;
var currentFrame = _framework.LastUpdateUTC; var currentFrame = _framework.LastUpdateUTC;
if (currentFrame == _frame) if (currentFrame == _frame)
return; return;
@ -102,9 +106,7 @@ public class PenumbraAutoRedraw : IDisposable, IRequiredService
_frame = currentFrame; _frame = currentFrame;
_framework.RunOnFrameworkThread(() => _framework.RunOnFrameworkThread(() =>
{ {
var playerName = _penumbra.GetCurrentPlayerCollection(); _state.ReapplyState(_objects.Player, StateSource.IpcManual);
if (playerName == name)
_state.ReapplyState(_objects.Player, StateSource.IpcManual);
Glamourer.Log.Debug( Glamourer.Log.Debug(
$"Automatically applied mod settings of type {type} to {_objects.PlayerData.Identifier.Incognito(null)} (Local Player)."); $"Automatically applied mod settings of type {type} to {_objects.PlayerData.Identifier.Incognito(null)} (Local Player).");
}); });