Skip to content
Success

Changes

Summary

  1. Move the StagingController to FixedUpdate (commit: b179937) (details)
Commit b179937dc2277d6781785e02842dfa7f791e2c29 by lamont
Move the StagingController to FixedUpdate

Right now this is being called in Update() which is just very
weird.

Having it run every frame is just a total waste of CPU.

If there is a $reason for doing things this way, I suspect that it
is to lazy the controller so that every other module can twiddle
its variables and then it always runs after FixedUpdate().

So changed it so that it runs last in FixedUpdate() instead of
running in Update().

This could very well introduce unforeseen bugs, but I think it is
worth it for the performance improvement and it just eliminates
weirdness with multiple staging controller actions for every
physics tick in the logs, and that WTF factor is pretty large.
(commit: b179937)
The file was modified MechJeb2/MechJebCore.cs (diff)
The file was modified MechJeb2/MechJebModuleStagingController.cs (diff)