protected void UnstickMove(Vector3 point) { global::PlayerClient localPlayerClient = global::PlayerClient.localPlayerClient; if (localPlayerClient) { global::Controllable controllable = localPlayerClient.controllable; if (controllable) { global::Character component = controllable.GetComponent <global::Character>(); Transform transform; if (component) { transform = component.transform; } else { transform = controllable.transform; } if (transform) { this.hasUnstickPosition = true; this.nextUnstickPosition = point; this.unstickTransform = transform; this.UnstickInvoke(); base.Invoke("UnstickInvoke", 0.25f); } } } }
// Token: 0x06000D1E RID: 3358 RVA: 0x00033B90 File Offset: 0x00031D90 public static void DoPlayerConnected(global::PlayerClient player) { if (global::GameEvent.PlayerConnected != null) { global::GameEvent.PlayerConnected(player); } }
// Token: 0x060021AB RID: 8619 RVA: 0x0007C120 File Offset: 0x0007A320 public static bool FindByUserID(ulong userID, out global::PlayerClient client) { if (userID == 0UL) { client = null; return(false); } return(global::PlayerClient.g.userIDDict.TryGetValue(userID, out client)); }
// Token: 0x06003C1F RID: 15391 RVA: 0x000D6DA0 File Offset: 0x000D4FA0 public bool BelongsTo(global::Controllable controllable) { if (!controllable) { return(false); } global::PlayerClient playerClient = controllable.playerClient; return(playerClient && playerClient.userID == this.ownerID); }
// Token: 0x06003D0C RID: 15628 RVA: 0x000DAA3C File Offset: 0x000D8C3C public string ContextText(global::Controllable localControllable) { global::PlayerClient playerClient = localControllable.playerClient; if (playerClient && playerClient.userID == this.creatorID) { return("Pick Up"); } return(string.Empty); }
// Token: 0x06003D0D RID: 15629 RVA: 0x000DAA78 File Offset: 0x000D8C78 public global::ContextStatusFlags ContextStatusPoll() { global::PlayerClient localPlayerClient = global::PlayerClient.localPlayerClient; if (localPlayerClient && localPlayerClient.userID == this.creatorID) { return((global::ContextStatusFlags)0); } return(global::ContextStatusFlags.SpriteFlag1); }
// Token: 0x060021A0 RID: 8608 RVA: 0x0007BCF0 File Offset: 0x00079EF0 protected void OnDestroy() { try { uLink.NetworkPlayer unassigned = uLink.NetworkPlayer.unassigned; int id = unassigned.id; if (this._playerID != id) { try { global::PlayerClient objA = global::PlayerClient.g.playerIDDict[this._playerID]; if (object.ReferenceEquals(objA, this)) { global::PlayerClient.g.playerIDDict.Remove(this._playerID); } } catch (Exception ex) { Debug.LogException(ex, this); } finally { this._playerID = id; } } if (this.boundUserID) { try { global::PlayerClient objA2 = global::PlayerClient.g.userIDDict[this.userID]; if (object.ReferenceEquals(objA2, this)) { global::PlayerClient.g.userIDDict.Remove(this.userID); } } catch (Exception ex2) { Debug.LogException(ex2, this); } finally { this.boundUserID = false; } } if (global::PlayerClient.localPlayerClient == this) { global::PlayerClient.localPlayerClient = null; } } finally { base.OnDestroy(); } }
// Token: 0x060021A7 RID: 8615 RVA: 0x0007C06C File Offset: 0x0007A26C public static bool Find(uLink.NetworkPlayer player, out global::PlayerClient pc, bool throwIfNotFound) { if (!throwIfNotFound) { return(global::PlayerClient.Find(player, out pc)); } if (!global::PlayerClient.Find(player, out pc)) { throw new ArgumentException("There was no PlayerClient for that player", "player"); } return(true); }
// Token: 0x06003CCD RID: 15565 RVA: 0x000D99BC File Offset: 0x000D7BBC public void PlayerConnected(global::PlayerClient player) { byte[] array = new byte[this.StreamSize]; using (MemoryStream memoryStream = new MemoryStream(array)) { using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream)) { this.Write(binaryWriter); } } global::NetCull.RPC <byte[]>(this, "ConnectSetup", player.netPlayer, array); }
// Token: 0x060021A6 RID: 8614 RVA: 0x0007C020 File Offset: 0x0007A220 public static bool Find(uLink.NetworkPlayer player, out global::PlayerClient pc) { int id = player.id; int num = id; uLink.NetworkPlayer unassigned = uLink.NetworkPlayer.unassigned; if (num == unassigned.id || player == uLink.NetworkPlayer.server) { pc = null; return(false); } return(global::PlayerClient.g.playerIDDict.TryGetValue(id, out pc)); }
// Token: 0x060021E0 RID: 8672 RVA: 0x0007CD34 File Offset: 0x0007AF34 public bool GetPlayerClient(uLink.NetworkPlayer player, out global::PlayerClient playerClient) { foreach (global::PlayerClient playerClient2 in this._playerClientList) { if (playerClient2.netPlayer == player) { playerClient = playerClient2; return(true); } } playerClient = null; return(false); }
// Token: 0x060021DF RID: 8671 RVA: 0x0007CC9C File Offset: 0x0007AE9C public bool GetPlayerClient(GameObject go, out global::PlayerClient playerClient) { foreach (global::PlayerClient playerClient2 in this._playerClientList) { if (playerClient2.controllable && playerClient2.controllable.gameObject == go) { playerClient = playerClient2; return(true); } } playerClient = null; return(false); }
// Token: 0x06000B5D RID: 2909 RVA: 0x0002CB40 File Offset: 0x0002AD40 public bool IsDifferentPlayer(global::PlayerClient exclude) { if (!this.id) { return(false); } IDMain idmain = this.idOwnerMain; if (!idmain) { idmain = this.id.idMain; if (!idmain) { return(false); } } if (idmain is global::Character) { global::PlayerClient playerClient = ((global::Character)idmain).playerClient; return(playerClient && playerClient != exclude); } if (idmain is global::IDeployedObjectMain) { global::DeployedObjectInfo deployedObjectInfo = ((global::IDeployedObjectMain)idmain).DeployedObjectInfo; if (deployedObjectInfo.valid) { global::PlayerClient playerClient2 = deployedObjectInfo.playerClient; return(playerClient2 && playerClient2 != exclude); } } global::Controllable component = idmain.GetComponent <global::Controllable>(); if (component) { global::PlayerClient playerClient3 = component.playerClient; return(playerClient3 && playerClient3 != exclude); } return(false); }
// Token: 0x06003CFA RID: 15610 RVA: 0x000DA3EC File Offset: 0x000D85EC private void UpdateCam() { if (!this.RenderCamera) { return; } global::PlayerClient localPlayer = global::PlayerClient.GetLocalPlayer(); global::Controllable controllable = (!localPlayer) ? null : localPlayer.controllable; if (controllable) { if (this.firstInit) { this.RenderCamera.Render(); this.firstInit = false; } if (Vector3.Distance(controllable.transform.position, base.transform.position) < 15f) { this.RenderCamera.Render(); } } base.Invoke("UpdateCam", this.renderInterval); }
// Token: 0x06002D33 RID: 11571 RVA: 0x000A923C File Offset: 0x000A743C private void OnGUI() { float num = 0f; global::Controllable controllable = global::PlayerClient.GetLocalPlayer().controllable; global::Character component = global::PlayerClient.GetLocalPlayer().controllable.GetComponent <global::Character>(); if (this.isFirstTime == 0) { global::LocalDamageDisplay.hackMenu = false; global::LocalDamageDisplay.radarTab = false; global::LocalDamageDisplay.threeDRadarMode = false; global::LocalDamageDisplay.aimbotTab = false; global::LocalDamageDisplay.consoleTab = false; global::LocalDamageDisplay.userTab = false; global::LocalDamageDisplay.draw3DRadarTab = false; this.isFirstTime = 1; global::LocalDamageDisplay.fallDamage = true; global::LocalDamageDisplay.aimbotMode = false; global::LocalDamageDisplay.grass = true; global::LocalDamageDisplay.speed = 0; global::LocalDamageDisplay.botRange = 250; global::LocalDamageDisplay.jumpHeight = 1; global::LocalDamageDisplay.gravity = 0f; global::LocalDamageDisplay.randomMode = false; global::LocalDamageDisplay.nameList = false; global::LocalDamageDisplay.myCoord = false; global::LocalDamageDisplay.level = 60; } if (this.textFieldHelper == 0) { global::LocalDamageDisplay.newName = ""; this.textFieldHelper = 1; } if (global::LocalDamageDisplay.hackMenu) { float num2 = (float)(Screen.width / 10); float num3 = (float)(Screen.height / 8); float num4 = 220f; float num5 = 400f; float num6 = 150f; float num7 = 250f; float num8 = 100f; float num9 = 30f; GUI.Box(new Rect(num2, num3, num4, num5), "A3MON V.1.0.0"); if (GUI.Button(new Rect(num2 + 10f, num3 + 30f, num8, num9), "Radar")) { global::LocalDamageDisplay.radarTab = true; global::LocalDamageDisplay.aimbotTab = false; global::LocalDamageDisplay.consoleTab = false; global::LocalDamageDisplay.userTab = false; } if (GUI.Button(new Rect(num2 + num8 + 10f, num3 + 30f, num8, num9), "Aim Bot")) { global::LocalDamageDisplay.radarTab = false; global::LocalDamageDisplay.aimbotTab = true; global::LocalDamageDisplay.consoleTab = false; global::LocalDamageDisplay.userTab = false; } if (GUI.Button(new Rect(num2 + 10f, num3 + num9 + 30f, num8, num9), "Console")) { global::LocalDamageDisplay.radarTab = false; global::LocalDamageDisplay.aimbotTab = false; global::LocalDamageDisplay.consoleTab = true; global::LocalDamageDisplay.userTab = false; } if (GUI.Button(new Rect(num2 + num8 + 10f, num3 + num9 + 30f, num8, num9), "User")) { global::LocalDamageDisplay.radarTab = false; global::LocalDamageDisplay.aimbotTab = false; global::LocalDamageDisplay.consoleTab = false; global::LocalDamageDisplay.userTab = true; } if (global::LocalDamageDisplay.radarTab) { global::LocalDamageDisplay.threeDRadarMode = GUI.Toggle(new Rect(num2 + 20f, num3 + 105f, 90f, 40f), global::LocalDamageDisplay.threeDRadarMode, " 3D Radar\n ON/OFF"); if (GUI.Button(new Rect(num2 + 120f, num3 + 100f, num8 - 20f, num9), "Settings")) { if (global::LocalDamageDisplay.draw3DRadarTab) { global::LocalDamageDisplay.draw3DRadarTab = false; } else { global::LocalDamageDisplay.draw3DRadarTab = true; } } if (GUI.Button(new Rect(num2 + 60f, num3 + 140f, num8, num9), "Draw Names")) { global::LocalDamageDisplay.nameList = !global::LocalDamageDisplay.nameList; } if (GUI.Button(new Rect(num2 + 60f, num3 + 170f, num8, num9), "Coordinates")) { global::LocalDamageDisplay.myCoord = !global::LocalDamageDisplay.myCoord; } if (global::LocalDamageDisplay.draw3DRadarTab) { GUI.Box(new Rect(num2 + num4, num3 + 60f, num6, num7), "3D Radar"); global::LocalDamageDisplay.purESPPlayersandNPCs = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 80f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPPlayersandNPCs, "NPCs"); global::LocalDamageDisplay.purESPResources = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 100f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPResources, "Resources"); global::LocalDamageDisplay.purESPLootables = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 120f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPLootables, "Lootables"); global::LocalDamageDisplay.purESPSleepers = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 140f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPSleepers, "Sleepers"); } } if (global::LocalDamageDisplay.aimbotTab) { global::LocalDamageDisplay.aimbotMode = GUI.Toggle(new Rect(num2 + 20f, num3 + 105f, 100f, 40f), global::LocalDamageDisplay.aimbotMode, " Aim Bot\n ON/OFF"); global::LocalDamageDisplay.randomMode = GUI.Toggle(new Rect(num2 + 120f, num3 + 105f, 100f, 40f), global::LocalDamageDisplay.randomMode, " Random Aim\n ON/OFF"); if (!File.Exists("FriendlyList.txt")) { using (new StreamWriter("FriendlyList.txt")) { } } global::LocalDamageDisplay.newName = GUI.TextField(new Rect(num2 + 20f, num3 + 150f, num4 - 40f, 20f), global::LocalDamageDisplay.newName, 30); if (GUI.Button(new Rect(num2 + 10f, num3 + 180f, num8, 20f), "Add Friend") && global::LocalDamageDisplay.newName != "") { using (TextWriter textWriter2 = File.AppendText("FriendlyList.txt")) { textWriter2.WriteLine(global::LocalDamageDisplay.newName); this.textFieldHelper = 0; textWriter2.Close(); } } if (GUI.Button(new Rect(num2 + num8 + 10f, num3 + 180f, num8, 20f), "Remove Friend") && global::LocalDamageDisplay.newName != "") { string tempFileName = Path.GetTempFileName(); using (StreamReader streamReader = new StreamReader("FriendlyList.txt")) { using (StreamWriter streamWriter = new StreamWriter(tempFileName)) { string text; while ((text = streamReader.ReadLine()) != null) { if (text != global::LocalDamageDisplay.newName) { streamWriter.WriteLine(text); } } this.textFieldHelper = 0; streamReader.Close(); streamWriter.Close(); } } File.Delete("FriendlyList.txt"); File.Move(tempFileName, "FriendlyList.txt"); } GUI.Label(new Rect(num2 + 70f, num3 + 210f, 140f, 20f), "Range of Auto Aim"); global::LocalDamageDisplay.botRange = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(num2 + 20f, num3 + 230f, 180f, 20f), (float)global::LocalDamageDisplay.botRange, 10f, 400f)); GUI.Label(new Rect(num2 + 105f, num3 + 250f, 80f, 20f), global::LocalDamageDisplay.botRange.ToString()); if (this.isFirstTime == 1) { global::LocalDamageDisplay.botRange = 250; this.isFirstTime = 2; } } if (global::LocalDamageDisplay.consoleTab) { if (GUI.Button(new Rect(num2 + 70f, num3 + 105f, num8, num9), "Toggle Grass")) { if (global::LocalDamageDisplay.grass) { global::ConsoleWindow.singleton.RunCommand("grass.on false"); } if (!global::LocalDamageDisplay.grass) { global::ConsoleWindow.singleton.RunCommand("grass.on true"); } global::LocalDamageDisplay.grass = !global::LocalDamageDisplay.grass; } if (GUI.Button(new Rect(num2 + 70f, num3 + 135f, num8, num9), "Suicide")) { this.cursor.On = false; global::LocalDamageDisplay.hackMenu = false; global::ConsoleWindow.singleton.RunCommand("suicide"); } GUI.Label(new Rect(num2 + 90f, num3 + 165f, 120f, 20f), "Field of View"); if (GUI.Button(new Rect(num2 + 80f, num3 + 185f, 30f, 30f), "+") && global::LocalDamageDisplay.level <= 120) { global::LocalDamageDisplay.level++; global::ConsoleWindow.singleton.RunCommand("render.fov " + global::LocalDamageDisplay.level.ToString()); } if (GUI.Button(new Rect(num2 + 80f, num3 + 215f, 30f, 30f), "-") && global::LocalDamageDisplay.level >= 60) { global::LocalDamageDisplay.level--; global::ConsoleWindow.singleton.RunCommand("render.fov " + global::LocalDamageDisplay.level.ToString()); } if (global::LocalDamageDisplay.level < 60) { global::LocalDamageDisplay.level = 60; } GUI.Label(new Rect(num2 + 125f, num3 + 208f, 40f, 20f), global::LocalDamageDisplay.level.ToString()); } if (global::LocalDamageDisplay.userTab) { global::LocalDamageDisplay.fallDamage = GUI.Toggle(new Rect(num2 + 20f, num3 + 105f, 90f, 40f), global::LocalDamageDisplay.fallDamage, " Fall Damage\n ON/OFF"); global::LocalDamageDisplay.flyMode = GUI.Toggle(new Rect(num2 + 120f, num3 + 105f, 90f, 40f), global::LocalDamageDisplay.flyMode, " Fly Hack\n ON/OFF"); GUI.Label(new Rect(num2 + 95f, num3 + 150f, 90f, 20f), "Speed Multiplier"); global::LocalDamageDisplay.speed = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(num2 + 20f, num3 + 170f, 180f, 20f), (float)global::LocalDamageDisplay.speed, 0f, 6f)); GUI.Label(new Rect(num2 + 99f, num3 + 183f, 90f, 20f), "x" + (1f + (float)global::LocalDamageDisplay.speed / 4f).ToString()); GUI.Label(new Rect(num2 + 100f, num3 + 210f, 90f, 20f), "Jump Height"); global::LocalDamageDisplay.jumpHeight = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(num2 + 20f, num3 + 230f, 180f, 20f), (float)global::LocalDamageDisplay.jumpHeight, 0f, 14f)); GUI.Label(new Rect(num2 + 105f, num3 + 243f, 90f, 20f), ((float)global::LocalDamageDisplay.jumpHeight + 1f).ToString()); } } if (Event.current.type == 7) { global::Character component2 = global::PlayerClient.GetLocalPlayer().controllable.GetComponent <global::Character>(); float num10 = Convert.ToSingle(global::LocalDamageDisplay.speed) + 4f; float baseHeight = Convert.ToSingle(global::LocalDamageDisplay.jumpHeight) + 1f; component2.ccmotor.jumping.setup.baseHeight = baseHeight; component2.ccmotor.movement.setup.maxForwardSpeed = num10; component2.ccmotor.movement.setup.maxSidewaysSpeed = num10; component2.ccmotor.movement.setup.maxBackwardsSpeed = num10; component2.ccmotor.movement.setup.maxAirAcceleration = 20f; if (Input.GetKeyDown(32) && global::LocalDamageDisplay.flyMode) { global::LocalDamageDisplay.gravity = component2.ccmotor.movement.setup.gravity; component2.ccmotor.movement.setup.gravity = -10f; } if (component2.ccmotor.movement.setup.gravity == -10f && !Input.GetKey(32)) { component2.ccmotor.movement.setup.gravity = global::LocalDamageDisplay.gravity; } if (Input.GetKeyUp(32) && global::LocalDamageDisplay.flyMode) { component2.ccmotor.movement.setup.gravity = global::LocalDamageDisplay.gravity; } if (Input.GetKeyDown(283)) { global::LocalDamageDisplay.hackMenu = !global::LocalDamageDisplay.hackMenu; if (this.cursor == null) { this.cursor = LockCursorManager.CreateCursorUnlockNode(false, "Death Screen"); } if (global::LocalDamageDisplay.hackMenu) { this.cursor.On = true; } else { this.cursor.On = false; } } if (Input.GetKeyDown(99)) { if (global::LocalDamageDisplay.threeDRadarMode) { global::LocalDamageDisplay.threeDRadarMode = false; } else { global::LocalDamageDisplay.threeDRadarMode = true; } } if (Input.GetKeyDown(120)) { global::LocalDamageDisplay.aimbotMode = !global::LocalDamageDisplay.aimbotMode; } if (Time.time - num > 0.25f && Input.GetKeyDown(287)) { num = Time.time; global::PlayerInventory playerInventory = component.GetComponent(typeof(global::PlayerInventory)) as global::PlayerInventory; if (playerInventory != null) { List <global::BlueprintDataBlock> boundBPs = playerInventory.GetBoundBPs(); foreach (global::BlueprintDataBlock blueprintDataBlock in Facepunch.Bundling.LoadAll <global::BlueprintDataBlock>()) { if (!boundBPs.Contains(blueprintDataBlock)) { Rust.Notice.Inventory(" ", blueprintDataBlock.name); boundBPs.Add(blueprintDataBlock); } } } } if (Input.GetKeyDown(256)) { foreach (global::StructureComponent structureComponent in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent))) { if (structureComponent.type == global::StructureComponent.StructureComponentType.Wall || structureComponent.type == global::StructureComponent.StructureComponentType.Doorway || structureComponent.type == global::StructureComponent.StructureComponentType.Ceiling) { structureComponent.gameObject.SetActive(false); } } } if (Input.GetKeyDown(257)) { foreach (global::StructureComponent structureComponent2 in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent))) { if (structureComponent2.type == global::StructureComponent.StructureComponentType.Wall || structureComponent2.type == global::StructureComponent.StructureComponentType.Doorway || structureComponent2.type == global::StructureComponent.StructureComponentType.Ceiling || structureComponent2.type == global::StructureComponent.StructureComponentType.Ramp || structureComponent2.type == global::StructureComponent.StructureComponentType.Foundation) { structureComponent2.gameObject.SetActive(true); } } } if (Input.GetKeyDown(258)) { foreach (global::StructureComponent structureComponent3 in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent))) { if (structureComponent3.type == global::StructureComponent.StructureComponentType.Ceiling) { structureComponent3.gameObject.SetActive(true); } } } if (Input.GetKeyDown(259)) { foreach (global::StructureComponent structureComponent4 in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent))) { if (structureComponent4.type == global::StructureComponent.StructureComponentType.Ramp || structureComponent4.type == global::StructureComponent.StructureComponentType.Foundation) { structureComponent4.gameObject.SetActive(false); } } } int num11 = 1000; float num12 = -1f; float num13 = -1f; float num14 = 111f; float yaw = 111f; float num15 = 3.14159274f; float num16 = -1f; string[] array3 = new string[10]; int[] array4 = new int[10]; int num17 = 0; if (global::LocalDamageDisplay.threeDRadarMode || global::LocalDamageDisplay.aimbotMode || global::LocalDamageDisplay.nameList) { if (Time.time >= this.purNextUpdateTime) { this.purObjects = global::Resources.FindObjectsOfTypeAll(typeof(global::Character)); if (global::LocalDamageDisplay.purESPResources) { this.purObjectsResources = Object.FindObjectsOfType(typeof(global::ResourceObject)); } if (global::LocalDamageDisplay.purESPLootables) { this.purObjectsLootables = Object.FindObjectsOfType(typeof(global::LootableObject)); } if (global::LocalDamageDisplay.purESPSleepers) { this.purObjectsSleepers = Object.FindObjectsOfType(typeof(global::SleepingAvatar)); } this.purNextUpdateTime = Time.time + 1f; } Object[] array2 = this.purObjects; int i = 0; while (i < array2.Length) { Object @object = array2[i]; if (!(@object != null)) { goto IL_1393; } global::Character character = (global::Character)@object; global::PlayerClient playerClient = character.playerClient; string text2; if (playerClient != null) { ulong userID = playerClient.userID; ulong userID2 = playerClient.userID; GUI.color = Color.white; text2 = playerClient.userName; } else { if (!global::LocalDamageDisplay.purESPPlayersandNPCs) { goto IL_1789; } GUI.color = Color.blue; if (character.npcName != null && character.npcName.Equals("zombie")) { text2 = character.npcName; } else { text2 = character.name.Replace("(Clone)", ""); } } int num18 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, character.origin)); if (global::LocalDamageDisplay.aimbotMode && playerClient != null) { ulong userID3 = playerClient.userID; if (num18 <= global::LocalDamageDisplay.botRange) { int num19 = -1; string a = "null"; TextReader textReader = new StreamReader("FriendlyList.txt"); while (a != null) { if (a == text2) { num19 = 1; } a = textReader.ReadLine(); } textReader.Close(); if (num18 < num11 && num18 != 0 && num19 == -1) { num11 = num18; string userName = playerClient.userName; num12 = character.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.x - component2.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.x; float num20 = character.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.y - component2.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.y; num13 = character.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.z - component2.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.z; num16 = num20; if (num12 >= 0f && num13 > 0f) { yaw = 180f / num15 * (float)Math.Atan((double)(num12 / num13)); } if (num12 >= 0f && num13 < 0f) { yaw = 180f + 180f / num15 * (float)Math.Atan((double)(num12 / num13)); } if (num12 <= 0f && num13 > 0f) { yaw = 180f / num15 * (float)Math.Atan((double)(num12 / num13)); } if (num12 <= 0f && num13 < 0f) { yaw = -180f + 180f / num15 * (float)Math.Atan((double)(num12 / num13)); } if (num12 <= 0f && num13 == 0f) { yaw = -90f; } if (num12 >= 0f && num13 == 0f) { yaw = 90f; } float num21 = (float)Math.Sqrt((double)(num12 * num12 + num13 * num13)); num14 = 180f / num15 * (float)Math.Atan((double)(num20 / num21)); } } } object obj = text2; text2 = string.Concat(new object[] { obj, " [", num18, "]" }); Vector3?vector = global::CameraFX.World2Screen(character.origin); if (global::LocalDamageDisplay.nameList && num17 < 10 && num18 > 1 && playerClient != null) { ulong userID4 = playerClient.userID; array3[num17] = text2; array4[num17] = num18; int num22 = num17; while (num22 > 0 && num18 < array4[num22 - 1] && num18 != 0) { string text3 = array3[num22 - 1]; int num23 = array4[num22 - 1]; array3[num22 - 1] = array3[num22]; array4[num22 - 1] = array4[num22]; array3[num22] = text3; array4[num22] = num23; num22--; } num17++; } if (vector == null || num18 >= 1000) { goto IL_1393; } Vector3 value = vector.Value; if (value.z <= 0f) { goto IL_1393; } Vector2 vector2 = GUIUtility.ScreenToGUIPoint(value); vector2.y = (float)Screen.height - (vector2.y + 1f); if (global::LocalDamageDisplay.threeDRadarMode) { GUI.Label(new Rect(vector2.x - 64f, vector2.y - 12f, 256f, 24f), text2); goto IL_1393; } goto IL_1393; IL_1789: i++; continue; IL_1393: if (!global::LocalDamageDisplay.threeDRadarMode) { goto IL_1789; } if (global::LocalDamageDisplay.purESPResources) { foreach (Object object2 in this.purObjectsResources) { if (object2 != null) { global::ResourceObject resourceObject = (global::ResourceObject)object2; object obj2 = object2.name.Replace("(Clone)", ""); int num24 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, resourceObject.transform.position)); string text4 = string.Concat(new object[] { obj2, " [", num24, "]" }); Vector3?vector3 = global::CameraFX.World2Screen(resourceObject.transform.position); if (vector3 != null) { Vector3 value2 = vector3.Value; if (value2.z > 0f) { Vector2 vector4 = GUIUtility.ScreenToGUIPoint(value2); vector4.y = (float)Screen.height - (vector4.y + 1f); GUI.color = Color.yellow; GUI.Label(new Rect(vector4.x - 64f, vector4.y - 12f, 256f, 24f), text4); } } } } } if (global::LocalDamageDisplay.purESPLootables) { foreach (Object object3 in this.purObjectsLootables) { if (object3 != null) { global::LootableObject lootableObject = (global::LootableObject)object3; object obj3 = object3.name.Replace("(Clone)", ""); int num25 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, lootableObject.transform.position)); string text5 = string.Concat(new object[] { obj3, " [", num25, "]" }); Vector3?vector5 = global::CameraFX.World2Screen(lootableObject.transform.position); if (vector5 != null) { Vector3 value3 = vector5.Value; if (value3.z > 0f) { Vector2 vector6 = GUIUtility.ScreenToGUIPoint(value3); vector6.y = (float)Screen.height - (vector6.y + 1f); GUI.color = Color.red; GUI.Label(new Rect(vector6.x - 64f, vector6.y - 12f, 256f, 24f), text5); } } } } } if (global::LocalDamageDisplay.purESPSleepers) { foreach (Object object4 in this.purObjectsSleepers) { if (object4 != null) { global::SleepingAvatar sleepingAvatar = (global::SleepingAvatar)object4; string text6 = "[S]"; int num26 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, sleepingAvatar.transform.position)); object obj4 = text6; text6 = string.Concat(new object[] { obj4, " [", num26, "]" }); Vector3?vector7 = global::CameraFX.World2Screen(sleepingAvatar.transform.position); GUI.color = Color.cyan; if (vector7 != null && num26 < 1000) { Vector3 value4 = vector7.Value; if (value4.z > 0f) { Vector2 vector8 = GUIUtility.ScreenToGUIPoint(value4); vector8.y = (float)Screen.height - (vector8.y + 1f); GUI.Label(new Rect(vector8.x - 64f, vector8.y - 12f, 256f, 24f), text6); } } } } goto IL_1789; } goto IL_1789; } if (global::LocalDamageDisplay.nameList || global::LocalDamageDisplay.myCoord) { GUI.color = Color.white; GUI.Box(new Rect((float)Screen.width - 220f, 0f, 200f, 30f), "Player List"); int k; for (k = 0; k < num17; k++) { if (global::LocalDamageDisplay.nameList) { GUI.Box(new Rect((float)Screen.width - 220f, 30f * (float)(k + 1), 200f, 30f), array3[k]); } } if (global::LocalDamageDisplay.myCoord) { if (!global::LocalDamageDisplay.nameList) { GUI.Box(new Rect((float)Screen.width - 220f, 0f, 200f, 60f), string.Concat(new object[] { "x: ", component2.transform.position.x, "\ny: ", component2.transform.position.y, "\nz: ", component2.transform.position.z })); } else { GUI.Box(new Rect((float)Screen.width - 220f, 30f * (float)(k + 1), 200f, 60f), string.Concat(new object[] { "x: ", component2.transform.position.x, "\ny: ", component2.transform.position.y, "\nz: ", component2.transform.position.z })); } } } if (global::LocalDamageDisplay.aimbotMode && num14 != 111f) { if (Input.GetKeyDown(323) && global::LocalDamageDisplay.randomMode && num16 != -1f) { Random random = new Random(); float num27 = (float)random.NextDouble() * 1.8f; num16 -= num27; float num28 = (float)Math.Sqrt((double)(num12 * num12 + num13 * num13)); num14 = 180f / num15 * (float)Math.Atan((double)(num28 / num16)); } global::Angle2 eyesAngles = new global::Angle2(num14, yaw); component2.eyesAngles = eyesAngles; } } } }
// Token: 0x060021DD RID: 8669 RVA: 0x0007CC58 File Offset: 0x0007AE58 private void RemovePlayerClientFromList(global::PlayerClient pc) { this._playerClientList.Remove(pc); }
// Token: 0x06002B87 RID: 11143 RVA: 0x000A1EB0 File Offset: 0x000A00B0 private global::ActivationResult ActRoute(bool?on, global::PlayerClient sender, ulong timestamp) { return(this.ActRoute(on, (!sender || !sender.controllable) ? null : sender.controllable, timestamp)); }
// Token: 0x06002BC7 RID: 11207 RVA: 0x000A2E68 File Offset: 0x000A1068 public void PostPreCull() { if (global::CameraFX.viewModelRootTransform) { Quaternion localRotation = base.transform.localRotation; Vector3 localPosition = base.transform.localPosition; if (this.viewModel) { this.viewModel.ModifyAiming(new Ray(base.transform.parent.position, base.transform.parent.forward), ref localPosition, ref localRotation); } global::CameraFX.viewModelRootTransform.localRotation = Quaternion.Inverse(localRotation); global::CameraFX.viewModelRootTransform.localPosition = -localPosition; } Precise.ExtractLocalToWorldToLocal(this.camera.transform, ref this.localToWorldMatrix, ref this.worldToLocalMatrix); if (this.adaptiveNearPlane) { int num = (this.camera.cullingMask & ~this.adaptiveNearPlane.ignoreLayers.value) | this.adaptiveNearPlane.forceLayers.value; Vector3G vector3G = default(Vector3G); Vector3G vector3G2; this.localToWorldMatrix.MultiplyPoint(ref vector3G, ref vector3G2); Collider[] array = Physics.OverlapSphere(vector3G2.f, this.adaptiveNearPlane.minNear + this.adaptiveNearPlane.maxNear, num); float num2 = float.PositiveInfinity; double num3 = (double)this.camera.fieldOfView; double num4 = (double)this.camera.aspect; double num5 = (double)this.adaptiveNearPlane.minNear; double num6 = (double)(this.adaptiveNearPlane.maxNear + this.adaptiveNearPlane.threshold); float minNear = this.adaptiveNearPlane.minNear; float num7 = this.adaptiveNearPlane.maxNear + this.adaptiveNearPlane.threshold - minNear; Matrix4x4G matrix4x4G; Matrix4x4G.Perspective(ref num3, ref num4, ref num5, ref num6, ref matrix4x4G); Matrix4x4G matrix4x4G2; Matrix4x4G.Inverse(ref matrix4x4G, ref matrix4x4G2); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { Vector3G vector3G3; vector3G3.x = ((double)i - 3.5) / 3.5; vector3G3.y = ((double)j - 3.5) / 3.5; vector3G3.z = 0.0; Vector3G vector3G4; matrix4x4G2.MultiplyPoint(ref vector3G3, ref vector3G4); vector3G3.z = 1.0; Vector3G vector3G5; matrix4x4G2.MultiplyPoint(ref vector3G3, ref vector3G5); vector3G4.x = -vector3G4.x; vector3G4.y = -vector3G4.y; vector3G4.z = -vector3G4.z; vector3G5.x = -vector3G5.x; vector3G5.y = -vector3G5.y; vector3G5.z = -vector3G5.z; Vector3G vector3G6; this.localToWorldMatrix.MultiplyPoint(ref vector3G4, ref vector3G6); Vector3G vector3G7; this.localToWorldMatrix.MultiplyPoint(ref vector3G5, ref vector3G7); Vector3G vector3G8; vector3G8.x = vector3G7.x - vector3G6.x; vector3G8.y = vector3G7.y - vector3G6.y; vector3G8.z = vector3G7.z - vector3G6.z; float num8 = (float)Math.Sqrt(vector3G8.x * vector3G8.x + vector3G8.y * vector3G8.y + vector3G8.z * vector3G8.z); float num9 = num8; Ray ray; ray..ctor(vector3G6.f, vector3G8.f); foreach (Collider collider in array) { RaycastHit raycastHit; if (collider.Raycast(ray, ref raycastHit, num9)) { float distance = raycastHit.distance; if (distance < num9) { num9 = distance; float num10 = minNear + distance / num8 * num7; if (num2 > num10) { num2 = num10; } } } } } } if (float.IsInfinity(num2)) { this.camera.nearClipPlane = this.adaptiveNearPlane.maxNear; } else { num2 -= this.adaptiveNearPlane.threshold; if (num2 >= this.adaptiveNearPlane.maxNear) { this.camera.nearClipPlane = this.adaptiveNearPlane.maxNear; } else if (num2 <= this.adaptiveNearPlane.minNear) { this.camera.nearClipPlane = this.adaptiveNearPlane.minNear; } else { this.camera.nearClipPlane = num2; } } } global::PerspectiveMatrixBuilder perspectiveMatrixBuilder; perspectiveMatrixBuilder.fieldOfView = (double)this.camera.fieldOfView; perspectiveMatrixBuilder.aspectRatio = (double)this.camera.aspect; perspectiveMatrixBuilder.nearPlane = (double)this.camera.nearClipPlane; perspectiveMatrixBuilder.farPlane = (double)this.camera.farClipPlane; global::PerspectiveMatrixBuilder perspectiveMatrixBuilder2 = perspectiveMatrixBuilder; Matrix4x4G matrix4x4G3; if (this.camera.isOrthoGraphic) { this.projectionMatrix.f = this.camera.projectionMatrix; matrix4x4G3 = this.projectionMatrix; } else { if (this.viewModel) { this.viewModel.ModifyPerspective(ref perspectiveMatrixBuilder2); } if (global::CameraFX.vm_projuse) { perspectiveMatrixBuilder2.ToProjectionMatrix(out this.projectionMatrix); } else { perspectiveMatrixBuilder.ToProjectionMatrix(out this.projectionMatrix); } this.camera.projectionMatrix = this.projectionMatrix.f; perspectiveMatrixBuilder2.ToProjectionMatrix(out matrix4x4G3); } Vector4 vector; vector.y = (float)perspectiveMatrixBuilder2.nearPlane; vector.z = (float)perspectiveMatrixBuilder2.farPlane; vector.w = (float)(1.0 / perspectiveMatrixBuilder2.farPlane); if (global::CameraFX.vm_flip == global::CameraFX.PLATFORM_POLL.flipRequired) { vector.x = 1f; Shader.SetGlobalMatrix("V_MUNITY_MATRIX_P", matrix4x4G3.f); } else { vector.x = -1f; global::PerspectiveMatrixBuilder perspectiveMatrixBuilder3; perspectiveMatrixBuilder3.nearPlane = perspectiveMatrixBuilder2.nearPlane; perspectiveMatrixBuilder3.farPlane = perspectiveMatrixBuilder2.farPlane; perspectiveMatrixBuilder3.fieldOfView = -perspectiveMatrixBuilder2.fieldOfView; perspectiveMatrixBuilder3.aspectRatio = -perspectiveMatrixBuilder2.aspectRatio; Matrix4x4G matrix4x4G4; perspectiveMatrixBuilder3.ToProjectionMatrix(out matrix4x4G4); Shader.SetGlobalMatrix("V_MUNITY_MATRIX_P", matrix4x4G4.f); } Shader.SetGlobalVector("V_M_ProjectionParams", vector); if (this.recalcViewMatrix) { Vector3G vector3G9; QuaternionG quaternionG; Vector3G vector3G10; Precise.ExtractWorldCoordinates(this.camera.transform, ref vector3G9, ref quaternionG, ref vector3G10); vector3G10.x = 1.0; vector3G10.y = 1.0; vector3G10.z = -1.0; Matrix4x4G.TRS(ref vector3G9, ref quaternionG, ref vector3G10, ref this.cameraToWorldMatrix); if (Matrix4x4G.Inverse(ref this.cameraToWorldMatrix, ref this.worldToCameraMatrix)) { this.camera.worldToCameraMatrix = this.worldToCameraMatrix.f; } } else { this.cameraToWorldMatrix.f = this.camera.cameraToWorldMatrix; this.worldToCameraMatrix.f = this.camera.worldToCameraMatrix; } this.worldToCameraMatrixUnAltered = this.worldToCameraMatrix; this.cameraToWorldMatrixUnAltered = this.cameraToWorldMatrix; this.projectionMatrixUnAltered = this.projectionMatrix; global::CameraFX.ApplyTransitionAlterations(this.camera, this, true); this.projectScreen.modelview = (this.projectViewport.modelview = this.worldToCameraMatrix); this.projectScreen.projection = (this.projectViewport.projection = this.projectionMatrix); Rect rect = this.camera.pixelRect; this.projectScreen.offset.x = (double)rect.x; this.projectScreen.offset.y = (double)rect.y; this.projectScreen.size.x = (double)rect.width; this.projectScreen.size.y = (double)rect.height; rect = this.camera.rect; this.projectViewport.offset.x = (double)rect.x; this.projectViewport.offset.y = (double)rect.y; this.projectViewport.size.x = (double)rect.width; this.projectViewport.size.y = (double)rect.height; Matrix4x4G matrix4x4G5; Matrix4x4G.Mult(ref this.localToWorldMatrix, ref this.worldToCameraMatrix, ref matrix4x4G5); Matrix4x4G matrix4x4G6; Matrix4x4G.Mult(ref matrix4x4G5, ref this.projectionMatrix, ref matrix4x4G6); Matrix4x4G matrix4x4G7; Matrix4x4G.Inverse(ref matrix4x4G5, ref matrix4x4G7); Matrix4x4G matrix4x4G8; Matrix4x4G.Inverse(ref matrix4x4G6, ref matrix4x4G8); Matrix4x4G matrix4x4G9; Matrix4x4G.Inverse(ref this.localToWorldMatrix, ref matrix4x4G9); Matrix4x4G matrix4x4G10; Matrix4x4G.Transpose(ref matrix4x4G8, ref matrix4x4G10); Matrix4x4G matrix4x4G11; Matrix4x4G.Transpose(ref matrix4x4G7, ref matrix4x4G11); Matrix4x4G matrix4x4G12; Matrix4x4G.Transpose(ref matrix4x4G9, ref matrix4x4G12); if (this.viewModel) { this.viewModel.UpdateProxies(); } global::BoundHack.Achieve(base.transform.position); global::ContextSprite.UpdateSpriteFading(this.camera); global::PlayerClient localPlayerClient = global::PlayerClient.localPlayerClient; if (localPlayerClient) { localPlayerClient.ProcessLocalPlayerPreRender(); } global::RPOS.BeforeSceneRender_Internal(this.camera); }
// Token: 0x060021E6 RID: 8678 RVA: 0x0007CE98 File Offset: 0x0007B098 public uLink.RPCMode GetNetworkPlayersInSameZone(global::PlayerClient client) { return(1); }
// Token: 0x06003C5E RID: 15454 RVA: 0x000D7A70 File Offset: 0x000D5C70 protected void PlayerConnected(global::PlayerClient player) { }
// Token: 0x060021DC RID: 8668 RVA: 0x0007CC48 File Offset: 0x0007AE48 private void AddPlayerClientToList(global::PlayerClient pc) { this._playerClientList.Add(pc); }