public virtual void TabTargetUpdateInput() { bool isFocusInputField = GenericUtils.IsFocusInputField(); bool isPointerOverUIObject = CacheUISceneGameplay.IsPointerOverUIObject(); if (CacheGameplayCameraControls != null) { CacheGameplayCameraControls.updateRotationX = false; CacheGameplayCameraControls.updateRotationY = false; CacheGameplayCameraControls.updateRotation = !isFocusInputField && !isPointerOverUIObject && InputManager.GetButton("CameraRotate"); CacheGameplayCameraControls.updateZoom = !isFocusInputField && !isPointerOverUIObject; } if (isFocusInputField) { return; } if (PlayerCharacterEntity.IsDead()) { return; } // If it's building something, don't allow to activate NPC/Warp/Pickup Item if (ConstructingBuildingEntity == null) { Targeting.HandleTargeting(); if (InputManager.GetButtonDown("PickUpItem")) { PickUpItem(); } if (InputManager.GetButtonDown("Reload")) { ReloadAmmo(); } if (InputManager.GetButtonDown("ExitVehicle")) { PlayerCharacterEntity.CallServerExitVehicle(); } if (InputManager.GetButtonDown("SwitchEquipWeaponSet")) { PlayerCharacterEntity.CallServerSwitchEquipWeaponSet((byte)(PlayerCharacterEntity.EquipWeaponSet + 1)); } if (InputManager.GetButtonDown("Sprint")) { isSprinting = !isSprinting; } // Auto reload if (PlayerCharacterEntity.EquipWeapons.rightHand.IsAmmoEmpty() || PlayerCharacterEntity.EquipWeapons.leftHand.IsAmmoEmpty()) { ReloadAmmo(); } } // Update enemy detecting radius to attack distance EnemyEntityDetector.detectingRadius = Mathf.Max(PlayerCharacterEntity.GetAttackDistance(false), wasdClearTargetDistance); // Update inputs TabTargetUpdateQueuedSkill(); TabTargetUpdatePointClickInput(); TabTargetUpdateWASDInput(); // Set sprinting state PlayerCharacterEntity.SetExtraMovement(isSprinting ? ExtraMovementState.IsSprinting : ExtraMovementState.None); }