Thanks cim, I put this fix into [wiki]ReverseControl[/wiki] v1.2.cim wrote:player.ship.AI
. If it's "dockingAI.plist
" then the docking computer is active.
Now docking computer is working well in the aft view also.
Moderators: winston, another_commander
Thanks cim, I put this fix into [wiki]ReverseControl[/wiki] v1.2.cim wrote:player.ship.AI
. If it's "dockingAI.plist
" then the docking computer is active.
I can't reproduce your problem, nor imagine how this happen. The whole code is very short and all relevant lines are within the following condition (ps=player.ship):Zireael wrote:it reversed my controls in the front view, too.
Code: Select all
if( ps && ps.isValid && !ps.docked && ps.viewDirection == "VIEW_AFT"
&& ps.AI != "dockingAI.plist" ) {
Code: Select all
var a = ps.pitch * delta;
var c = prevori.vectorRight();
ps.orientation = ps.orientation.rotate( c, 2 * a );
2*a
where needed.Code: Select all
this.$ReverseControl_FCB = function( delta ) { //FrameCallBack
var ps = player.ship;
var a, c = null;
if( ps && ps.isValid && !ps.docked && this.$ReverseControlOn && ps.AI != "dockingAI.plist" ) {
var prevori = this.$ReverseControlPrevOri;
if( prevori ) switch ( ps.viewDirection ) {
case "VIEW_AFT":
//reverse up-down
a = ps.pitch * delta;
c = prevori.vectorRight();
ps.orientation = ps.orientation.rotate( c, 2 * a ); // 2 * incl's correcting for pitch cmd that got us here
//reverse roll
a = ps.roll * delta;
c = prevori.vectorForward();
ps.orientation = ps.orientation.rotate( c, 2 * a ); // 2 * incl's correcting for roll cmd that got us here
break;
case "VIEW_PORT":
//pitch -> roll
a = ps.pitch * delta;
c = prevori.vectorRight();
ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's pitch
c = prevori.vectorForward();
ps.orientation = ps.orientation.rotate( c, -1 * a ); // - now apply pitch cmd as roll
//roll -> -pitch
a = ps.roll * delta;
c = prevori.vectorForward();
ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's roll
c = prevori.vectorRight();
ps.orientation = ps.orientation.rotate( c, 1 * a ); // - now apply roll cmd as pitch
break;
case "VIEW_STARBOARD":
//pitch -> roll
a = ps.pitch * delta;
c = prevori.vectorRight();
ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's pitch
c = prevori.vectorForward();
ps.orientation = ps.orientation.rotate( c, 1 * a ); // - now apply pitch cmd as roll
//roll -> -pitch
a = ps.roll * delta;
c = prevori.vectorForward();
ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's roll
c = prevori.vectorRight();
ps.orientation = ps.orientation.rotate( c, -1 * a ); // - now apply roll cmd as pitch
break;
default:
this.$Stop();
}
this.$ReverseControlPrevOri = ps.orientation;
} else {
this.$ReverseControlPrevOri = null;
}
}
Latest.log
?You mean like this:
Code: Select all
14:03:35.062 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (BGS 2.0): TypeError: this._aid.keepOnScreenID is undefined
14:03:35.062 [script.javaScript.exception.unexpectedType]: ../AddOns/BGS2.0.oxp/Scripts/BGS.js, line 191.