From 6532b34d7ae3c985469c25e3f307d0eca0e0e9f8 Mon Sep 17 00:00:00 2001 From: ALittlePatate Date: Sun, 8 Jan 2023 18:45:56 +0100 Subject: [PATCH] fix: fixed all the warnings --- DevourClient/Hacks/Misc.cs | 3 +-- DevourClient/Helpers/Render.cs | 2 +- DevourClient/Helpers/StateHelper.cs | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/DevourClient/Hacks/Misc.cs b/DevourClient/Hacks/Misc.cs index 87d55d8..6b9c49e 100644 --- a/DevourClient/Hacks/Misc.cs +++ b/DevourClient/Hacks/Misc.cs @@ -240,8 +240,7 @@ namespace DevourClient.Hacks foreach (Il2Cpp.KeyBehaviour keyBehaviour in Helpers.Entities.Keys) { - bool flag = keyBehaviour == null; - if (flag) + if (keyBehaviour == null) { return; } diff --git a/DevourClient/Helpers/Render.cs b/DevourClient/Helpers/Render.cs index 1ad2e30..d5b0ddf 100644 --- a/DevourClient/Helpers/Render.cs +++ b/DevourClient/Helpers/Render.cs @@ -28,7 +28,7 @@ namespace DevourClient.Render GUI.color = color2; } - public static Texture2D lineTex; + public static Texture2D lineTex = default!; public static void DrawLine(Vector2 pointA, Vector2 pointB, Color color, float width) { Matrix4x4 matrix = GUI.matrix; diff --git a/DevourClient/Helpers/StateHelper.cs b/DevourClient/Helpers/StateHelper.cs index 14f4ab2..0764773 100644 --- a/DevourClient/Helpers/StateHelper.cs +++ b/DevourClient/Helpers/StateHelper.cs @@ -22,7 +22,7 @@ namespace DevourClient.Helpers { if (Entities.LocalPlayer_ == null) { - return null; + return null!; } return Entities.LocalPlayer_.GetComponent(); @@ -49,15 +49,15 @@ namespace DevourClient.Helpers public class Entities { - public static GameObject LocalPlayer_; - public static GameObject[] Players; - public static Il2Cpp.GoatBehaviour[] GoatsAndRats; - public static Il2Cpp.SurvivalInteractable[] SurvivalInteractables; - public static Il2Cpp.KeyBehaviour[] Keys; - public static Il2Cpp.SurvivalDemonBehaviour[] Demons; - public static Il2Cpp.SpiderBehaviour[] Spiders; - public static Il2Cpp.GhostBehaviour[] Ghosts; - public static Il2Cpp.SurvivalAzazelBehaviour[] Azazels; + public static GameObject LocalPlayer_ = default!; + public static GameObject[] Players = default!; + public static Il2Cpp.GoatBehaviour[] GoatsAndRats = default!; + public static Il2Cpp.SurvivalInteractable[] SurvivalInteractables = default!; + public static Il2Cpp.KeyBehaviour[] Keys = default!; + public static Il2Cpp.SurvivalDemonBehaviour[] Demons = default!; + public static Il2Cpp.SpiderBehaviour[] Spiders = default!; + public static Il2Cpp.GhostBehaviour[] Ghosts = default!; + public static Il2Cpp.SurvivalAzazelBehaviour[] Azazels = default!; public static IEnumerator GetLocalPlayer() {