From e2f1d63d6bd463c889cf559af25003812167b026 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Fri, 7 May 2021 19:23:24 +0100 Subject: [PATCH] cleanup --- .../Player/Thrusters/RemoteThrusterFlameController.cs | 8 +++----- QSB/Animation/Player/Thrusters/ThrusterManager.cs | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/QSB/Animation/Player/Thrusters/RemoteThrusterFlameController.cs b/QSB/Animation/Player/Thrusters/RemoteThrusterFlameController.cs index 013cda18..8c4126c5 100644 --- a/QSB/Animation/Player/Thrusters/RemoteThrusterFlameController.cs +++ b/QSB/Animation/Player/Thrusters/RemoteThrusterFlameController.cs @@ -12,7 +12,6 @@ namespace QSB.Animation.Player.Thrusters private float _belowMaxThrustScalar = 1f; private MeshRenderer _thrusterRenderer; private Vector3 _thrusterFilter; - private bool _thrustersFiring; private float _baseLightRadius; private float _currentScale; @@ -37,7 +36,6 @@ namespace QSB.Animation.Player.Thrusters { _thrusterRenderer = GetComponent(); _thrusterFilter = OWUtilities.GetShipThrusterFilter(_thruster); - _thrustersFiring = false; _baseLightRadius = _light.range; _currentScale = 0f; _thrusterRenderer.enabled = false; @@ -68,15 +66,15 @@ namespace QSB.Animation.Player.Thrusters _currentScale = 0f; _scaleSpring.ResetVelocity(); } - if ((!_thrustersFiring) && _currentScale <= 0.001f) + if (_currentScale <= 0.001f) { _currentScale = 0f; _scaleSpring.ResetVelocity(); } transform.localScale = Vector3.one * _currentScale; _light.range = _baseLightRadius * _currentScale; - _thrusterRenderer.enabled = (_currentScale > 0f); - _light.enabled = (_currentScale > 0f); + _thrusterRenderer.enabled = _currentScale > 0f; + _light.enabled = _currentScale > 0f; } private float GetThrustFraction() => Vector3.Dot(_attachedPlayer.JetpackAcceleration.LocalAcceleration, _thrusterFilter); diff --git a/QSB/Animation/Player/Thrusters/ThrusterManager.cs b/QSB/Animation/Player/Thrusters/ThrusterManager.cs index f48ea1cb..e8d256fd 100644 --- a/QSB/Animation/Player/Thrusters/ThrusterManager.cs +++ b/QSB/Animation/Player/Thrusters/ThrusterManager.cs @@ -57,11 +57,9 @@ namespace QSB.Animation.Player.Thrusters } } - private static void CreatePlayerParticlesController(GameObject root) - { + private static void CreatePlayerParticlesController(GameObject root) => // TODO : Implement this. (Footsteps / Landing) Object.Destroy(root.GetComponent()); - } private static void CreateThrusterParticlesBehaviour(GameObject root, PlayerInfo player) {