public static void Enable() { if (!DrawUtilities.ShouldRun()) { return; } MiscOptions.ShowPlayersOnMap = OV_LevelLighting.WasEnabled; OV_LevelLighting.OV_updateLighting(); }
public static void Enable() { if (!DrawUtilities.ShouldRun()) { return; } MiscOptions.Compass = OV_PlayerLifeUI.WasCompassEnabled; PlayerLifeUI.updateCompass(); }
public static void OV_updateLighting() { if (DrawUtilities.ShouldRun() && MiscOptions.SetTimeEnabled && !PlayerCoroutines.IsSpying && !MiscOptions.PanicMode) { float time = LevelLighting.time; OV_LevelLighting.Time.SetValue(null, MiscOptions.Time); OverrideUtilities.CallOriginal(null, Array.Empty <object>()); OV_LevelLighting.Time.SetValue(null, time); return; } OverrideUtilities.CallOriginal(null, Array.Empty <object>()); }
// Token: 0x0600003B RID: 59 RVA: 0x00006540 File Offset: 0x00004740 private void OnGUI() { if (!DrawUtilities.ShouldRun()) { return; } if (ESPOptions.ShowVanishPlayers) { GUI.color = new Color(1f, 1f, 1f, 0f); VanishPlayerComponent.vew = GUILayout.Window(350, VanishPlayerComponent.vew, new GUI.WindowFunction(this.PlayersMenu), string.Empty, Array.Empty <GUILayoutOption>()); GUI.color = Color.white; } }
public static void Enable() { if (!DrawUtilities.ShouldRun()) { return; } MiscOptions.ShowPlayersOnMap = OV_PlayerDashboardInformationUI.WasEnabled; MiscOptions.GPS = OV_PlayerDashboardInformationUI.WasGPSEnabled; OV_PlayerDashboardInformationUI.RefreshStaticMap.Invoke(Player.player.inventory, new object[] { OV_PlayerDashboardInformationUI.GetMap() }); OV_PlayerDashboardInformationUI.OV_refreshDynamicMap(); }
// Token: 0x0600025F RID: 607 RVA: 0x0001659C File Offset: 0x0001479C public void FixedUpdate() { if (!DrawUtilities.ShouldRun()) { return; } if (MiscOptions.SpectatedPlayer != null && !PlayerCoroutines.IsSpying) { Player.player.look.isOrbiting = true; Player.player.look.orbitPosition = MiscOptions.SpectatedPlayer.transform.position - Player.player.transform.position; Player.player.look.orbitPosition += new Vector3(0f, 3f, 0f); return; } Player.player.look.isOrbiting = MiscOptions.Freecam; }
// Token: 0x0600016F RID: 367 RVA: 0x0000F9D4 File Offset: 0x0000DBD4 public void Update() { OptimizationVariables.MainCam = Camera.main; if (!DrawUtilities.ShouldRun()) { return; } if (!MenuComponent.IsInMenu && !MiscOptions.PanicMode) { foreach (KeyValuePair <string, Hotkey> keyValuePair in HotkeyOptions.ChatKeys) { KeyCode[] keys = keyValuePair.Value.Keys; if (keys.Any(new Func <KeyCode, bool>(Input.GetKeyDown)) && keys.All(new Func <KeyCode, bool>(Input.GetKey))) { ChatManager.sendChat(EChatMode.GLOBAL, keyValuePair.Key); } } } if (MiscComponent.fall != MiscOptions.SlowFall) { MiscComponent.fall = MiscOptions.SlowFall; Player.player.movement.pluginGravityMultiplier = (MiscComponent.fall ? 0f : 1f); } if (!MiscOptions.NightVision) { if (MiscOptions.WasNightVision) { LevelLighting.vision = ELightingVision.NONE; LevelLighting.updateLighting(); PlayerLifeUI.updateGrayscale(); MiscOptions.WasNightVision = false; } return; } LevelLighting.vision = ELightingVision.MILITARY; LevelLighting.updateLighting(); PlayerLifeUI.updateGrayscale(); MiscOptions.WasNightVision = true; }
public static bool OV_GetKey(KeyCode key) { if (DrawUtilities.ShouldRun() && OV_Input.InputEnabled) { if (key == ControlsSettings.primary) { if (TriggerbotOptions.IsFiring) { return(true); } } if (key != ControlsSettings.left) { if (key != ControlsSettings.right) { if (key != ControlsSettings.up && key != ControlsSettings.down) { goto IL_52; } } } if (MiscOptions.SpectatedPlayer != null) { return(false); } IL_52: return((bool)OverrideUtilities.CallOriginal(null, new object[] { key })); } return((bool)OverrideUtilities.CallOriginal(null, new object[] { key })); }
public void OV_Update() { if (!DrawUtilities.ShouldRun()) { return; } if (Player.player.stance.stance != EPlayerStance.DRIVING) { if (Player.player.stance.stance != EPlayerStance.SITTING) { if (!Player.player.life.isDead && !Player.player.workzone.isBuilding) { if (Time.realtimeSinceStartup - OV_PlayerInteract.lastInteract > 0.1f) { int num = 0; if (InteractionOptions.InteractThroughWalls && !PlayerCoroutines.IsSpying) { if (!InteractionOptions.NoHitBarricades) { num |= RayMasks.BARRICADE; } if (!InteractionOptions.NoHitItems) { num |= RayMasks.ITEM; } if (!InteractionOptions.NoHitResources) { num |= RayMasks.RESOURCE; } if (!InteractionOptions.NoHitStructures) { num |= RayMasks.STRUCTURE; } if (!InteractionOptions.NoHitVehicles) { num |= RayMasks.VEHICLE; } if (!InteractionOptions.NoHitEnvironment) { num |= (RayMasks.LARGE | RayMasks.MEDIUM | RayMasks.ENVIRONMENT | RayMasks.GROUND); } } else { num = RayMasks.PLAYER_INTERACT; } OV_PlayerInteract.lastInteract = Time.realtimeSinceStartup; float num2 = (!InteractionOptions.InteractThroughWalls || PlayerCoroutines.IsSpying) ? 4f : 20f; PhysicsUtility.raycast(new Ray(OptimizationVariables.MainCam.transform.position, OptimizationVariables.MainCam.transform.forward), out OV_PlayerInteract.hit, (Player.player.look.perspective == EPlayerPerspective.THIRD) ? (num2 + 2f) : num2, num, QueryTriggerInteraction.UseGlobal); } Transform transform = (!(OV_PlayerInteract.hit.collider != null)) ? null : OV_PlayerInteract.hit.collider.transform; if (!(transform != OV_PlayerInteract.focus)) { goto IL_39E; } if (OV_PlayerInteract.focus != null && PlayerInteract.interactable != null) { InteractableDoorHinge componentInParent = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>(); if (componentInParent != null) { HighlighterTool.unhighlight(componentInParent.door.transform); } else { HighlighterTool.unhighlight(PlayerInteract.interactable.transform); } } OV_PlayerInteract.focus = null; OV_PlayerInteract.target = null; OV_PlayerInteract.interactable = null; OV_PlayerInteract.interactable2 = null; if (!(transform != null)) { goto IL_39E; } OV_PlayerInteract.focus = transform; OV_PlayerInteract.interactable = OV_PlayerInteract.focus.GetComponentInParent <Interactable>(); OV_PlayerInteract.interactable2 = OV_PlayerInteract.focus.GetComponentInParent <Interactable2>(); if (!(PlayerInteract.interactable != null)) { goto IL_39E; } OV_PlayerInteract.target = PlayerInteract.interactable.transform.FindChildRecursive("Target"); if (!PlayerInteract.interactable.checkInteractable()) { OV_PlayerInteract.target = null; OV_PlayerInteract.interactable = null; goto IL_39E; } if (!PlayerUI.window.isEnabled) { goto IL_39E; } if (!PlayerInteract.interactable.checkUseable()) { Color color = Color.red; InteractableDoorHinge componentInParent2 = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>(); if (componentInParent2 != null) { HighlighterTool.highlight(componentInParent2.door.transform, color); goto IL_39E; } HighlighterTool.highlight(PlayerInteract.interactable.transform, color); goto IL_39E; } else { Color color; if (!PlayerInteract.interactable.checkHighlight(out color)) { color = Color.green; } InteractableDoorHinge componentInParent3 = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>(); if (componentInParent3 != null) { HighlighterTool.highlight(componentInParent3.door.transform, color); goto IL_39E; } HighlighterTool.highlight(PlayerInteract.interactable.transform, color); goto IL_39E; } } } } if (OV_PlayerInteract.focus != null && PlayerInteract.interactable != null) { InteractableDoorHinge componentInParent4 = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>(); if (componentInParent4 != null) { HighlighterTool.unhighlight(componentInParent4.door.transform); } else { HighlighterTool.unhighlight(PlayerInteract.interactable.transform); } } OV_PlayerInteract.focus = null; OV_PlayerInteract.target = null; OV_PlayerInteract.interactable = null; OV_PlayerInteract.interactable2 = null; IL_39E: if (!Player.player.life.isDead) { EPlayerMessage message; string text; Color color2; if (!(PlayerInteract.interactable != null)) { if (OV_PlayerInteract.purchaseAsset != null && Player.player.movement.purchaseNode != null && !PlayerUI.window.showCursor) { PlayerUI.hint(null, EPlayerMessage.PURCHASE, string.Empty, Color.white, new object[] { OV_PlayerInteract.purchaseAsset.itemName, Player.player.movement.purchaseNode.cost }); } else if (OV_PlayerInteract.focus != null && OV_PlayerInteract.focus.CompareTag("Enemy")) { Player player = DamageTool.getPlayer(OV_PlayerInteract.focus); if (player != null && player != Player.player && !PlayerUI.window.showCursor) { PlayerUI.hint(null, EPlayerMessage.ENEMY, string.Empty, Color.white, new object[] { player.channel.owner }); } } } else if (PlayerInteract.interactable.checkHint(out message, out text, out color2) && !PlayerUI.window.showCursor) { if (!PlayerInteract.interactable.CompareTag("Item")) { PlayerUI.hint((!(OV_PlayerInteract.target != null)) ? OV_PlayerInteract.focus : OV_PlayerInteract.target, message, text, color2, Array.Empty <object>()); } else { PlayerUI.hint((!(OV_PlayerInteract.target != null)) ? OV_PlayerInteract.focus : OV_PlayerInteract.target, message, text, color2, new object[] { ((InteractableItem)PlayerInteract.interactable).item, ((InteractableItem)PlayerInteract.interactable).asset }); } } EPlayerMessage message2; float data; if (PlayerInteract.interactable2 != null && PlayerInteract.interactable2.checkHint(out message2, out data) && !PlayerUI.window.showCursor) { PlayerUI.hint2(message2, (!OV_PlayerInteract.isHoldingKey) ? 0f : ((Time.realtimeSinceStartup - OV_PlayerInteract.lastKeyDown) / this.salvageTime), data); } if ((Player.player.stance.stance == EPlayerStance.DRIVING || Player.player.stance.stance == EPlayerStance.SITTING) && !Input.GetKey(KeyCode.LeftShift)) { if (Input.GetKeyDown(KeyCode.F1)) { this.hotkey(0); } if (Input.GetKeyDown(KeyCode.F2)) { this.hotkey(1); } if (Input.GetKeyDown(KeyCode.F3)) { this.hotkey(2); } if (Input.GetKeyDown(KeyCode.F4)) { this.hotkey(3); } if (Input.GetKeyDown(KeyCode.F5)) { this.hotkey(4); } if (Input.GetKeyDown(KeyCode.F6)) { this.hotkey(5); } if (Input.GetKeyDown(KeyCode.F7)) { this.hotkey(6); } if (Input.GetKeyDown(KeyCode.F8)) { this.hotkey(7); } if (Input.GetKeyDown(KeyCode.F9)) { this.hotkey(8); } if (Input.GetKeyDown(KeyCode.F10)) { this.hotkey(9); } } if (Input.GetKeyDown(ControlsSettings.interact)) { OV_PlayerInteract.lastKeyDown = Time.realtimeSinceStartup; OV_PlayerInteract.isHoldingKey = true; } if (Input.GetKeyDown(ControlsSettings.inspect)) { if (ControlsSettings.inspect != ControlsSettings.interact) { if (Player.player.equipment.canInspect) { Player.player.channel.send("askInspect", ESteamCall.SERVER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, Array.Empty <object>()); } } } if (OV_PlayerInteract.isHoldingKey) { if (!Input.GetKeyUp(ControlsSettings.interact)) { if (Time.realtimeSinceStartup - OV_PlayerInteract.lastKeyDown > this.salvageTime) { OV_PlayerInteract.isHoldingKey = false; if (!PlayerUI.window.showCursor && PlayerInteract.interactable2 != null) { PlayerInteract.interactable2.use(); } } } else { OV_PlayerInteract.isHoldingKey = false; if (!PlayerUI.window.showCursor) { if (Player.player.stance.stance != EPlayerStance.DRIVING) { if (Player.player.stance.stance != EPlayerStance.SITTING) { if (OV_PlayerInteract.focus != null && PlayerInteract.interactable != null) { if (PlayerInteract.interactable.checkUseable()) { PlayerInteract.interactable.use(); return; } return; } else if (OV_PlayerInteract.purchaseAsset == null) { if (ControlsSettings.inspect != ControlsSettings.interact) { return; } if (Player.player.equipment.canInspect) { Player.player.channel.send("askInspect", ESteamCall.SERVER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, Array.Empty <object>()); return; } return; } else { if (Player.player.skills.experience >= Player.player.movement.purchaseNode.cost) { Player.player.skills.sendPurchase(Player.player.movement.purchaseNode); return; } return; } } } VehicleManager.exitVehicle(); return; } if (Player.player.inventory.isStoring && Player.player.inventory.shouldInteractCloseStorage) { PlayerDashboardUI.close(); PlayerLifeUI.open(); return; } if (PlayerBarricadeSignUI.active) { PlayerBarricadeSignUI.close(); PlayerLifeUI.open(); return; } if (PlayerBarricadeStereoUI.active) { PlayerBarricadeStereoUI.close(); PlayerLifeUI.open(); return; } if (PlayerBarricadeLibraryUI.active) { PlayerBarricadeLibraryUI.close(); PlayerLifeUI.open(); return; } if (PlayerBarricadeMannequinUI.active) { PlayerBarricadeMannequinUI.close(); PlayerLifeUI.open(); return; } if (PlayerNPCDialogueUI.active) { if (PlayerNPCDialogueUI.dialogueAnimating) { PlayerNPCDialogueUI.skipText(); return; } if (PlayerNPCDialogueUI.dialogueHasNextPage) { PlayerNPCDialogueUI.nextPage(); return; } PlayerNPCDialogueUI.close(); PlayerLifeUI.open(); return; } else { if (PlayerNPCQuestUI.active) { PlayerNPCQuestUI.closeNicely(); return; } if (PlayerNPCVendorUI.active) { PlayerNPCVendorUI.closeNicely(); return; } } } } return; } }