Unlock cursor crashing the game fixed
This commit is contained in:
@@ -136,18 +136,6 @@ namespace DevourClient.Hacks
|
|||||||
public PlayRandomAudioClip laughClips;
|
public PlayRandomAudioClip laughClips;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
NolanBehaviour[] Nolan_t = UnityEngine.Object.FindObjectsOfType<NolanBehaviour>();
|
|
||||||
|
|
||||||
for (int i = 0; i < Nolan_t.Length; i++)
|
|
||||||
{
|
|
||||||
NolanBehaviour Nolan = Nolan_t[i];
|
|
||||||
|
|
||||||
MelonLogger.Msg("-------------------------");
|
|
||||||
MelonLogger.Msg("isClient : " + Nolan.gameUI.isClient);
|
|
||||||
MelonLogger.Msg("senderName : " + Nolan.gameUI.name);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
PlayRandomAudioClip playRandomAudioClip = UnityEngine.Object.FindObjectOfType<PlayRandomAudioClip>();
|
PlayRandomAudioClip playRandomAudioClip = UnityEngine.Object.FindObjectOfType<PlayRandomAudioClip>();
|
||||||
NolanVoiceOvers nolanVoiceOvers = UnityEngine.Object.FindObjectOfType<NolanVoiceOvers>();
|
NolanVoiceOvers nolanVoiceOvers = UnityEngine.Object.FindObjectOfType<NolanVoiceOvers>();
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,23 @@ namespace DevourClient.Hooks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
[HarmonyPatch(typeof(RankHelpers))]
|
||||||
|
[HarmonyPatch(nameof(RankHelpers.CalculateExpGain))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
|
||||||
|
static class RankHelpers_CalculateExpGain
|
||||||
|
{
|
||||||
|
static void Postfix(ref RankHelpers.ExpGainInfo __result)
|
||||||
|
{
|
||||||
|
__result.baseExp = 200;
|
||||||
|
__result.winBonus = 200;
|
||||||
|
__result.awardsBonus = 200;
|
||||||
|
__result.totalExp = 200;
|
||||||
|
__result.gameModeBonus = 200;
|
||||||
|
MelonLoader.MelonLogger.Msg("called");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
[HarmonyPatch(typeof(Horror.Menu))]
|
[HarmonyPatch(typeof(Horror.Menu))]
|
||||||
[HarmonyPatch(nameof(Horror.Menu.SetupPerk))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
|
[HarmonyPatch(nameof(Horror.Menu.SetupPerk))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
|
||||||
|
|||||||
@@ -31,16 +31,20 @@ namespace DevourClient
|
|||||||
|
|
||||||
if (Input.GetKeyDown(KeyCode.Insert))
|
if (Input.GetKeyDown(KeyCode.Insert))
|
||||||
{
|
{
|
||||||
GameUI gameUI = UnityEngine.Object.FindObjectOfType<GameUI>();
|
try
|
||||||
|
{
|
||||||
|
GameUI gameUI = UnityEngine.Object.FindObjectOfType<GameUI>();
|
||||||
|
|
||||||
if (Settings.Settings.menu_enable)
|
if (Settings.Settings.menu_enable)
|
||||||
{
|
{
|
||||||
gameUI.HideMouseCursor();
|
gameUI.HideMouseCursor();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gameUI.ShowMouseCursor();
|
gameUI.ShowMouseCursor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
Settings.Settings.menu_enable = !Settings.Settings.menu_enable;
|
Settings.Settings.menu_enable = !Settings.Settings.menu_enable;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user