mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-13 12:14:18 +01:00
Maybe fix visor state issue.
This commit is contained in:
parent
3d421881f6
commit
8375abd6cb
4 changed files with 11 additions and 4 deletions
|
|
@ -568,7 +568,7 @@ public class StateListener : IDisposable
|
|||
}
|
||||
|
||||
/// <summary> Handle visor state changes made by the game. </summary>
|
||||
private void OnVisorChange(Model model, ref bool value)
|
||||
private unsafe void OnVisorChange(Model model, bool game, ref bool value)
|
||||
{
|
||||
// Skip updates when in customize update.
|
||||
if (ChangeCustomizeService.InUpdate.InMethod)
|
||||
|
|
@ -578,6 +578,13 @@ public class StateListener : IDisposable
|
|||
// We do not need to handle fixed designs,
|
||||
// since a fixed design would already have established state-tracking.
|
||||
var actor = _penumbra.GameObjectFromDrawObject(model);
|
||||
|
||||
// Only actually change anything if the actor state changed,
|
||||
// when equipping headgear the method is called with the current draw object state,
|
||||
// which corrupts Glamourer's assumed game state otherwise.
|
||||
if (!game && actor.AsCharacter->DrawData.IsVisorToggled != value)
|
||||
return;
|
||||
|
||||
if (_condition[ConditionFlag.CreatingCharacter] && actor.Index >= ObjectIndex.CutsceneStart)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue