public static bool UnderwaterJumping(Exosuit exosuit)
        {
            if (Player.main.GetVehicle() != exosuit)
            {
                return(false);
            }

            bool bJumpHeld     = GameInput.GetButtonHeld(GameInput.Button.Jump);
            bool bIsUnderwater = exosuit.IsUnderwater();

            //Log.LogDebug($"ExosuitPatches.UnderwaterJumping: bJumpHeld = " + (bJumpHeld ? " true" : "false") + ", bIsUnderwater = " + (bIsUnderwater ? " true" : "false"));
            return(bJumpHeld && bIsUnderwater);
        }
Beispiel #2
0
        internal override void PostOverrideAcceleration(ref Vector3 acceleration)
        {
            Exosuit parentExosuit = parentVehicle as Exosuit;

            if (ExosuitPatches.ExosuitIsSprinting(parentExosuit, lastMoveDirection))
            {
                float thrust = GetForceMultiplier(true, ExosuitPatches.ExosuitIsJumping(parentExosuit, lastMoveDirection) && parentExosuit.IsUnderwater());
                acceleration.x *= thrust;
                acceleration.z *= thrust;
            }
        }