pioneerspacesim/pioneer — pull request #1570 by irigi (2012-10-04 08:01:16+00:00)
Title: Manual rotation control

This is my first commit, so I hope I'm not doing something completely wrong. I wrote some code to implement issue #1156. The idea is that every ship has a computer that (among other things) takes care about matching the angular velocity to desired one, i.e. it stops the ship rotation when you are not pressing any keys. This code enables you to switch the angular momentum fixing off by a button in the information card of the ship (F3).

When in this "manual rotation mode", you may rotate your ship at will, but it doesn't stop rotating afterwards. To implement this:
* I added argument bool manualRotationAllowed to function PollControls, which specifies if manual rotation is allowed for particular mode of control. (Now it is allowed only in manual control mode, in all other modes the computer takes control automatically.)
* The angular velocity was set to zero everytime you changed time acceleration mode. I put if-condition there so that accelerating time doesn't set the angular velocity to zero when in manual rotation control - it would look strange, because accelerating time should not change anything.
* I added a condition which ensures that you cannot go to very high time accelerations if you are wildly rotating around.
* In higher time acceleration (HTA) modes, your angular thrusters are softened as in normal mode - let's say it is safety condition enforced by the ship computer. If this was not in place, the angular thrusters would be over-sensitive in HTA modes.
* Button was added to Ship Information Card to toggle manual ship rotation mode on and off.

Please let me know what you think about it. Particularly:
* Is the button on right place or should the switch to the manual rotation mode be made in some other way?
* What do you thing about the limitation to maximum angular speed depending of time acceleration? I mean, if I truly controlled the thrusters manually, I could easily spin the ship like hell, but this would probably only made the player's experience worse, right?
* Anything else :-)

Thanks!