[1.193.022] Gravity generator with acceleration value == NaN

MoryakSPb shared this bug 3 years ago

In implementations of the "GravityAcceleration" property of the "IMyGravityGeneratorBase" interface, located in the "SpaceEngineers.Game.ModAPI.Ingame" namespace, the value is not checked for NaN, which leads to incorrect grid power behavior when a NaN acceleration is set.

Bug reproduction script:

        // Requires gravity generator installed on a grid with PB
        private readonly IMyGravityGeneratorBase gen;

        public Program()
            List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>();
            gen = blocks.OfType<IMyGravityGeneratorBase>().First();

        public void Main() => gen.GravityAcceleration = float.NaN;
The bug can be fixed by adding a value check for NaN in implementations.

Replies (1)


Hello, Engineer!

Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.

We really appreciate your patience.

Kind Regards

Keen Software House: QA Department

Leave a Comment
Attach a file