Hello, I have a problem. The problem is that I'm genuinely trying to implement something no sane FREDer should ever do, and that is to allow you to warp, in-mission. And select the exact point you want to warp to. And let you cancel the warp. And let you warp multiple times.
So what I've got is:
http://hastebin.com/mudimuguwa.pyIn human-readable terms: SEXP 1 sets time compression to 0.01x, saves the current position, orientation, and speed of the player to variables, changes the ship of the player to a dummy one that can actually move in 0.01x time compression, and locks all weapons on the player.
Sexp 2 cancels the warp by unlocking all weapons, and restoring the original position, orientation and speed of the player. Sexps 3, 4, and 5 combined should also do this.
However, when I do cancel the warp or complete the warp, the player ship spins. A lot. At a super-fast speed, flinging it 70k or so out of the playable area.
What am I doing wrong, apart from actually trying to make this work? I've set the rotdamp and damp of the dummy ship to 0 and made sure that I set the position, orientation and speed before changing the ship class on both cancelling and completing the warp. But it still flings all over the place.