added key/goat/rat/demon esp + optimizations
This commit is contained in:
@@ -17,12 +17,15 @@ namespace DevourClient.Render
|
||||
set { GUI.color = value; }
|
||||
}
|
||||
|
||||
public static void DrawString(Vector2 position, string label, bool centered = true)
|
||||
public static void DrawString(Vector2 position, Color color, string label, bool centered = true)
|
||||
{
|
||||
var content = new GUIContent(label);
|
||||
var size = StringStyle.CalcSize(content);
|
||||
var upperLeft = centered ? position - size / 2f : position;
|
||||
Color color2 = GUI.color;
|
||||
GUI.color = color;
|
||||
GUI.Label(new Rect(upperLeft, size), content);
|
||||
GUI.color = color2;
|
||||
}
|
||||
|
||||
public static Texture2D lineTex;
|
||||
@@ -62,7 +65,7 @@ namespace DevourClient.Render
|
||||
|
||||
if (playername != "" && esp || playername != "" && only_name)
|
||||
{
|
||||
Render.DrawString(new Vector2((footpos.x - (width / 2)) + 25, (float)Screen.height - footpos.y - height), playername, false);
|
||||
Render.DrawString(new Vector2((footpos.x - (width / 2)) + 25, (float)Screen.height - footpos.y - height), color, playername, false);
|
||||
}
|
||||
|
||||
//ESP BOX
|
||||
|
||||
@@ -3,6 +3,7 @@ using MelonLoader;
|
||||
using System.Threading;
|
||||
using DevourClient.Helpers;
|
||||
using Photon.Bolt;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace DevourClient
|
||||
{
|
||||
@@ -31,7 +32,8 @@ namespace DevourClient
|
||||
bool azazel_snapline = false;
|
||||
bool spam_message = false;
|
||||
bool item_esp = false;
|
||||
|
||||
bool goat_rat_esp = false;
|
||||
bool demon_esp = false;
|
||||
|
||||
|
||||
public override void OnApplicationStart()
|
||||
@@ -39,6 +41,7 @@ namespace DevourClient
|
||||
MelonLogger.Msg("For the Queen !");
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public override void OnUpdate()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Insert))
|
||||
@@ -124,6 +127,9 @@ namespace DevourClient
|
||||
}
|
||||
|
||||
public override void OnGUI()
|
||||
{
|
||||
//from https://www.unknowncheats.me/forum/unity/437277-mono-internal-optimisation-tips.html
|
||||
if (UnityEngine.Event.current.type == EventType.Repaint)
|
||||
{
|
||||
if (this.player_esp || this.player_snapline)
|
||||
{
|
||||
@@ -161,6 +167,38 @@ namespace DevourClient
|
||||
}
|
||||
}
|
||||
|
||||
if (this.goat_rat_esp)
|
||||
{
|
||||
foreach (GoatBehaviour goat in UnityEngine.Object.FindObjectsOfType<GoatBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<GoatBehaviour>)
|
||||
{
|
||||
if (goat != null)
|
||||
{
|
||||
|
||||
|
||||
Vector3 pivotPos = goat.transform.position; //Pivot point NOT at the origin, at the center
|
||||
Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet
|
||||
Vector3 playerHeadPos;
|
||||
playerHeadPos.x = pivotPos.x;
|
||||
playerHeadPos.z = pivotPos.z;
|
||||
playerHeadPos.y = pivotPos.y + 0.3f; //At the middle
|
||||
|
||||
if (Camera.main == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos);
|
||||
Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos);
|
||||
|
||||
if (w2s_footpos.z > 0f)
|
||||
{
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(0.94f, 0.61f, 0.18f, 1.0f), goat.name.Replace("Survival", "").Replace("(Clone)", ""), false, false, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.item_esp)
|
||||
{
|
||||
foreach (SurvivalInteractable obj in UnityEngine.Object.FindObjectsOfType<SurvivalInteractable>() as UnhollowerBaseLib.Il2CppReferenceArray<SurvivalInteractable>)
|
||||
@@ -168,7 +206,6 @@ namespace DevourClient
|
||||
if (obj != null)
|
||||
{
|
||||
|
||||
|
||||
Vector3 pivotPos = obj.transform.position; //Pivot point NOT at the origin, at the center
|
||||
Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet
|
||||
Vector3 playerHeadPos;
|
||||
@@ -189,8 +226,126 @@ namespace DevourClient
|
||||
//string playername = player.field_Private_PhotonView_0.field_Private_ObjectPublicObInBoStBoHaStObInHaUnique_0.field_Private_String_0;//player.photonView._Controller_k__BackingField.NickName;
|
||||
|
||||
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(1.0f, 1.0f, 1.0f), obj.prefabName.Replace("Survival", ""), false, false, true);
|
||||
}
|
||||
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(), obj.prefabName.Replace("Survival", ""), false, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyBehaviour key in UnityEngine.Object.FindObjectsOfType<KeyBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<KeyBehaviour>)
|
||||
{
|
||||
if (key != null)
|
||||
{
|
||||
|
||||
|
||||
Vector3 pivotPos = key.transform.position; //Pivot point NOT at the origin, at the center
|
||||
Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet
|
||||
Vector3 playerHeadPos;
|
||||
playerHeadPos.x = pivotPos.x;
|
||||
playerHeadPos.z = pivotPos.z;
|
||||
playerHeadPos.y = pivotPos.y + 0.3f; //At the middle
|
||||
|
||||
if (Camera.main == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos);
|
||||
Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos);
|
||||
|
||||
if (w2s_footpos.z > 0f)
|
||||
{
|
||||
//string playername = player.field_Private_PhotonView_0.field_Private_ObjectPublicObInBoStBoHaStObInHaUnique_0.field_Private_String_0;//player.photonView._Controller_k__BackingField.NickName;
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(1.0f, 1.0f, 1.0f), "Key", false, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.demon_esp)
|
||||
{
|
||||
foreach (SurvivalDemonBehaviour demon in UnityEngine.Object.FindObjectsOfType<SurvivalDemonBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<SurvivalDemonBehaviour>)
|
||||
{
|
||||
if (demon != null)
|
||||
{
|
||||
|
||||
|
||||
Vector3 pivotPos = demon.transform.position; //Pivot point NOT at the origin, at the center
|
||||
Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet
|
||||
Vector3 playerHeadPos;
|
||||
playerHeadPos.x = pivotPos.x;
|
||||
playerHeadPos.z = pivotPos.z;
|
||||
playerHeadPos.y = pivotPos.y + 0.3f; //At the middle
|
||||
|
||||
if (Camera.main == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos);
|
||||
Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos);
|
||||
|
||||
if (w2s_footpos.z > 0f)
|
||||
{
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(1.0f, 0.0f, 0.0f, 1.0f), demon.name.Replace("Survival", "").Replace("(Clone)", ""), false, false, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach (SpiderBehaviour spider in UnityEngine.Object.FindObjectsOfType<SpiderBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<SpiderBehaviour>)
|
||||
{
|
||||
if (spider != null)
|
||||
{
|
||||
|
||||
|
||||
Vector3 pivotPos = spider.transform.position; //Pivot point NOT at the origin, at the center
|
||||
Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet
|
||||
Vector3 playerHeadPos;
|
||||
playerHeadPos.x = pivotPos.x;
|
||||
playerHeadPos.z = pivotPos.z;
|
||||
playerHeadPos.y = pivotPos.y + 0.3f; //At the middle
|
||||
|
||||
if (Camera.main == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos);
|
||||
Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos);
|
||||
|
||||
if (w2s_footpos.z > 0f)
|
||||
{
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(1.0f, 0.0f, 0.0f, 1.0f), "Spider", false, false, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GhostBehaviour ghost in UnityEngine.Object.FindObjectsOfType<GhostBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<GhostBehaviour>)
|
||||
{
|
||||
if (ghost != null)
|
||||
{
|
||||
|
||||
|
||||
Vector3 pivotPos = ghost.transform.position; //Pivot point NOT at the origin, at the center
|
||||
Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet
|
||||
Vector3 playerHeadPos;
|
||||
playerHeadPos.x = pivotPos.x;
|
||||
playerHeadPos.z = pivotPos.z;
|
||||
playerHeadPos.y = pivotPos.y + 0.3f; //At the middle
|
||||
|
||||
if (Camera.main == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos);
|
||||
Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos);
|
||||
|
||||
if (w2s_footpos.z > 0f)
|
||||
{
|
||||
Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(1.0f, 0.0f, 0.0f, 1.0f), "Ghost", false, false, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -220,6 +375,8 @@ namespace DevourClient
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Settings.Settings.menu_enable) //Si on appuie sur INSERT
|
||||
{
|
||||
@@ -246,6 +403,8 @@ namespace DevourClient
|
||||
this.azazel_snapline = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 220, 150, 20), this.azazel_snapline, "Azazel Snapline");
|
||||
|
||||
this.item_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 280, 150, 20), this.item_esp, "Item ESP");
|
||||
this.goat_rat_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 310, 150, 20), this.goat_rat_esp, "Goat/Rat ESP");
|
||||
this.demon_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 340, 150, 20), this.demon_esp, "Demon ESP");
|
||||
|
||||
Load.unlimitedUV = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 220, 150, 20), Load.unlimitedUV, "Unlimited UV");
|
||||
Load._walkInLobby = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 250, 150, 20), Load._walkInLobby, "Walk In Lobby");
|
||||
|
||||
Reference in New Issue
Block a user