Closed shysteph closed 9 years ago
Except OnActive is only called once ever. Preferably we should find a way to have it work without it. Not going to merge the changes for now.
Ah wait, you didn't put back OnActive. Yeah this is what I had in mind. I'll take another look when I get my laptop back, but yes, I meant to do this when I removed OnActive but seemingly forgot.
Once I saw how things were working I figured the FixedUpdate check was what you intended and that it just was not quite working correctly. Let me guess repacked chutes never refire OnActive.
It surprises me that checking actual keypress state is better than responding to an event but then again it sounds like the whole ksp system is a bit of a hack.
Things like remote tech interact with action groups and parts directly and don't go through stages correct?
OnActive is directly dependant of the staging system... and you really don't want to to start on it. It's awful bottoms up. Nothing to do with it. Really, it's better to just ignore it and have my own little staging controller.
I added an untested change (not near my gaming machine). If the staging key is pressed and the current stage is 0 (no stages left) then any chutes that can be activated will be. This means that repacking a chute and hitting space on a fully staged craft (return vehicle?) will redeploy it without messing with the staging order. The old behavior checking inverseStage == CurrentStage gave this behavior and it seems desirable.
Merged, will test here and see how it fares.
On my machine at least when staging happens the current stage is the stage which we are coming from not the stage we are going to so the part stage needs to be compared to CurrentStage - 1 (next stage).
Previously this was working because the code for OnActive() would call ActivateRC(). With OnActive() removed though this has to work.