mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Make glamourers visor toggle trigger static visors. (?!?)
This commit is contained in:
parent
22e6c0655b
commit
b2b8f2b6eb
1 changed files with 6 additions and 4 deletions
|
|
@ -36,7 +36,7 @@ public class VisorService : IDisposable
|
||||||
/// <param name="human"> The draw object. </param>
|
/// <param name="human"> The draw object. </param>
|
||||||
/// <param name="on"> The desired state (true: toggled). </param>
|
/// <param name="on"> The desired state (true: toggled). </param>
|
||||||
/// <returns> Whether the state was changed. </returns>
|
/// <returns> Whether the state was changed. </returns>
|
||||||
public bool SetVisorState(Model human, bool on)
|
public unsafe bool SetVisorState(Model human, bool on)
|
||||||
{
|
{
|
||||||
if (!human.IsHuman)
|
if (!human.IsHuman)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -46,6 +46,8 @@ public class VisorService : IDisposable
|
||||||
if (oldState == on)
|
if (oldState == on)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// No clue what this flag does, but it's necessary for toggling static visors on or off, e.g. Alternate Cap (6229-1).
|
||||||
|
human.AsHuman->StateFlags |= (CharacterBase.StateFlag)0x40000000;
|
||||||
SetupVisorDetour(human, human.GetArmor(EquipSlot.Head).Set.Id, on);
|
SetupVisorDetour(human, human.GetArmor(EquipSlot.Head).Set.Id, on);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue