Consideration of Index controllers

Hud notifications
This commit is contained in:
SDraw 2022-03-23 11:37:07 +03:00
parent e87dfee1fe
commit 2a7e796862
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
5 changed files with 83 additions and 35 deletions

View file

@ -29,7 +29,7 @@ namespace ml_lme_cvr
static bool ms_hmdMode = false;
static float ms_rootAngle = 0f;
static bool ms_headAttach = false;
static Vector3 ms_headOffset = new Vector3(0f, 0f, 0f);
static Vector3 ms_headOffset = new Vector3(0f, -0.3f, 0.15f);
static bool ms_initialized = false;
@ -53,7 +53,7 @@ namespace ml_lme_cvr
static void BeforeSettingsLoad(ref CVRSettings __instance)
{
if(!ms_initialized && __instance != null)
if(!ms_initialized && (__instance != null))
{
var l_settings = HarmonyLib.Traverse.Create(__instance)?.Field("_settings")?.GetValue<System.Collections.Generic.List<ABI_RC.Core.Savior.CVRSettingsValue>>();
if(l_settings != null)
@ -72,8 +72,6 @@ namespace ml_lme_cvr
l_settings.Add(new CVRSettingsInt(ms_defaultSettings[11], 0));
}
// Changes events
// Enable tracking
__instance.settingBoolChanged.AddListener((name, value) =>
{