Changed FindObjectOfType<NolanBehaviour>() to Player.GetPlayer() to fix glitch

This commit is contained in:
ALittlePatate
2022-06-25 11:44:02 +02:00
parent c5432f7bc8
commit 52e7f7648a

View File

@@ -58,7 +58,7 @@ namespace DevourClient.Hacks
//so the things are not loaded and it throws a shit ton of errors in the console //so the things are not loaded and it throws a shit ton of errors in the console
try try
{ {
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>(); NolanBehaviour Nolan = Player.GetPlayer();//UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
Light flashlightSpot = Nolan.flashlightSpot; Light flashlightSpot = Nolan.flashlightSpot;
@@ -81,7 +81,7 @@ namespace DevourClient.Hacks
} }
public static void FlashlightColor(Color color) public static void FlashlightColor(Color color)
{ {
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>(); NolanBehaviour Nolan = Player.GetPlayer(); //UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
Light flashlightSpot = Nolan.flashlightSpot; Light flashlightSpot = Nolan.flashlightSpot;
flashlightSpot.color = color; flashlightSpot.color = color;
@@ -89,7 +89,7 @@ namespace DevourClient.Hacks
public static void TPKeys() public static void TPKeys()
{ {
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>(); NolanBehaviour Nolan = Player.GetPlayer(); //UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
foreach (KeyBehaviour keyBehaviour in UnityEngine.Object.FindObjectsOfType<KeyBehaviour>()) foreach (KeyBehaviour keyBehaviour in UnityEngine.Object.FindObjectsOfType<KeyBehaviour>())
{ {