This commit is contained in:
Ottermandias 2023-06-20 18:54:33 +02:00
parent d1d369a56b
commit 65ce391051
19 changed files with 757 additions and 158 deletions

View file

@ -23,13 +23,7 @@ public class VisorService : IDisposable
/// <summary> Obtain the current state of the Visor for the given draw object (true: toggled). </summary>
public unsafe bool GetVisorState(Model characterBase)
{
if (!characterBase.IsCharacterBase)
return false;
// TODO: use client structs.
return (characterBase.AsCharacterBase->UnkFlags_01 & Offsets.DrawObjectVisorStateFlag) != 0;
}
=> characterBase.IsCharacterBase && characterBase.AsCharacterBase->VisorToggled;
/// <summary> Manually set the state of the Visor for the given draw object. </summary>
/// <param name="human"> The draw object. </param>
@ -45,7 +39,6 @@ public class VisorService : IDisposable
if (oldState == on)
return false;
SetupVisorHook(human, (ushort)human.AsHuman->HeadSetID, on);
return true;
}