diff --git a/Assets/Scripts/Cheat/DoubleSpeed.cs b/Assets/Scripts/Cheat/DoubleSpeed.cs index c85fe6ed9b5dd144720cc374c37d119bb92820fd..a7ede4740020823d6af555a09e59a4413d69b434 100644 --- a/Assets/Scripts/Cheat/DoubleSpeed.cs +++ b/Assets/Scripts/Cheat/DoubleSpeed.cs @@ -22,7 +22,9 @@ namespace Nightmare public override void RunCommand() { _playerMovement = _player.GetComponent<PlayerMovement>(); - _playerMovement.speed *= 2; + // Double the speed but ensure it does not exceed 12 + float doubledSpeed = _playerMovement.speed * 2; + _playerMovement.speed = Mathf.Min(doubledSpeed, 12f); } public static DoubleSpeed CreateCommand()