mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-20 14:37:46 +01:00
Maybe fix weapon hidden state when leaving gpose or changing zones.
This commit is contained in:
parent
38a489d7f0
commit
a7c5d513d4
4 changed files with 11 additions and 4 deletions
|
|
@ -247,8 +247,13 @@ public class StateApplier(
|
|||
}
|
||||
case MetaIndex.WeaponState:
|
||||
{
|
||||
foreach (var actor in data.Objects.Where(a => a.IsCharacter))
|
||||
_metaService.SetWeaponState(actor, value);
|
||||
// Only apply to the GPose character because otherwise we get some weird incompatibility when leaving GPose.
|
||||
if (_objects.IsInGPose)
|
||||
foreach (var actor in data.Objects.Where(a => a.IsGPoseOrCutscene))
|
||||
_metaService.SetWeaponState(actor, value);
|
||||
else
|
||||
foreach (var actor in data.Objects.Where(a => a.IsCharacter))
|
||||
_metaService.SetWeaponState(actor, value);
|
||||
return;
|
||||
}
|
||||
case MetaIndex.VisorState:
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ public class StateEditor(
|
|||
|
||||
var actors = Applier.ChangeMetaState(state, index, settings.Source.RequiresChange());
|
||||
Glamourer.Log.Verbose(
|
||||
$"Set Head Gear Visibility in state {state.Identifier.Incognito(null)} from {old} to {value}. [Affecting {actors.ToLazyString("nothing")}.]");
|
||||
$"Set {index.ToName()} in state {state.Identifier.Incognito(null)} from {old} to {value}. [Affecting {actors.ToLazyString("nothing")}.]");
|
||||
StateChanged.Invoke(StateChangeType.Other, settings.Source, state, actors, new MetaTransaction(index, old, value));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue