Fix a view bug that could make the aircraft appear rotated from an
external view if the primary view was rotated before we switched.
This commit is contained in:
parent
e333080388
commit
0d457e78e2
4 changed files with 28 additions and 9 deletions
12
Makefile.am
12
Makefile.am
|
@ -32,9 +32,7 @@ fgfs-base-tar:
|
||||||
FlightGear/Scenery/w130n30/w123n37 \
|
FlightGear/Scenery/w130n30/w123n37 \
|
||||||
FlightGear/Scenery/w130n30/w122n37 \
|
FlightGear/Scenery/w130n30/w122n37 \
|
||||||
FlightGear/Sounds \
|
FlightGear/Sounds \
|
||||||
FlightGear/Textures \
|
FlightGear/[T-Za]* FlightGear/[c-z]*)
|
||||||
FlightGear/T[A-Za-df-z]* \
|
|
||||||
FlightGear/[U-W]* FlightGear/[c-m]*)
|
|
||||||
|
|
||||||
fgfs-base-zip:
|
fgfs-base-zip:
|
||||||
(cd $(HOME); \
|
(cd $(HOME); \
|
||||||
|
@ -44,9 +42,7 @@ fgfs-base-zip:
|
||||||
FlightGear/Scenery/w130n30/w123n37 \
|
FlightGear/Scenery/w130n30/w123n37 \
|
||||||
FlightGear/Scenery/w130n30/w122n37 \
|
FlightGear/Scenery/w130n30/w122n37 \
|
||||||
FlightGear/Sounds \
|
FlightGear/Sounds \
|
||||||
FlightGear/Textures \
|
FlightGear/[T-Za]* FlightGear/[c-z]* \
|
||||||
FlightGear/T[A-Za-df-z]* \
|
|
||||||
FlightGear/[U-W]* FlightGear/[c-z]* \
|
|
||||||
-x '*/CVS/*' )
|
-x '*/CVS/*' )
|
||||||
|
|
||||||
fgfs-base-patch:
|
fgfs-base-patch:
|
||||||
|
@ -57,9 +53,7 @@ fgfs-base-patch:
|
||||||
FlightGear/Scenery/w130n30/w123n37 \
|
FlightGear/Scenery/w130n30/w123n37 \
|
||||||
FlightGear/Scenery/w130n30/w122n37 \
|
FlightGear/Scenery/w130n30/w122n37 \
|
||||||
FlightGear/Sounds \
|
FlightGear/Sounds \
|
||||||
FlightGear/Textures \
|
FlightGear/[T-Za]* FlightGear/[c-z]*)
|
||||||
FlightGear/T[A-Za-df-z]* \
|
|
||||||
FlightGear/[U-W]* FlightGear/[c-m]*)
|
|
||||||
|
|
||||||
fgfs-textures-high:
|
fgfs-textures-high:
|
||||||
(cd $(HOME); \
|
(cd $(HOME); \
|
||||||
|
|
|
@ -354,6 +354,28 @@ void BusyCursor( int restore )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Center the view offsets
|
||||||
|
void CenterView( void ) {
|
||||||
|
if( mouse_mode = MOUSE_VIEW ) {
|
||||||
|
mouse_mode = MOUSE_POINTER;
|
||||||
|
_savedX = globals->get_options()->get_xsize()/2;
|
||||||
|
_savedY = globals->get_options()->get_ysize()/2;
|
||||||
|
_mVtoggle = 0;
|
||||||
|
Quat0();
|
||||||
|
build_rotmatrix(quat_mat, curquat);
|
||||||
|
glutSetCursor(GLUT_CURSOR_INHERIT);
|
||||||
|
|
||||||
|
// Is this necessary ??
|
||||||
|
if( !menu_on ) TurnCursorOff();
|
||||||
|
|
||||||
|
glutWarpPointer( _savedX, _savedY );
|
||||||
|
}
|
||||||
|
globals->get_current_view()->set_goal_view_offset(0.0);
|
||||||
|
globals->get_current_view()->set_view_offset(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int guiGetMouseButton(void)
|
int guiGetMouseButton(void)
|
||||||
{
|
{
|
||||||
return last_buttons;
|
return last_buttons;
|
||||||
|
|
|
@ -33,6 +33,7 @@ extern void guiMotionFunc ( int x, int y );
|
||||||
extern void guiMouseFunc(int button, int updown, int x, int y);
|
extern void guiMouseFunc(int button, int updown, int x, int y);
|
||||||
extern void maybeToggleMouse( void );
|
extern void maybeToggleMouse( void );
|
||||||
extern void BusyCursor( int restore );
|
extern void BusyCursor( int restore );
|
||||||
|
extern void CenterView( void );
|
||||||
|
|
||||||
extern void guiToggleMenu(void);
|
extern void guiToggleMenu(void);
|
||||||
extern void mkDialog(const char *txt);
|
extern void mkDialog(const char *txt);
|
||||||
|
|
|
@ -370,6 +370,8 @@ void GLUTkey(unsigned char k, int x, int y) {
|
||||||
fgUpdateSkyAndLightingParams();
|
fgUpdateSkyAndLightingParams();
|
||||||
return;
|
return;
|
||||||
case 118: // v key
|
case 118: // v key
|
||||||
|
// handles GUI state as well as Viewer LookAt Direction
|
||||||
|
CenterView();
|
||||||
globals->set_current_view( globals->get_viewmgr()->next_view() );
|
globals->set_current_view( globals->get_viewmgr()->next_view() );
|
||||||
fgReshape( globals->get_options()->get_xsize(),
|
fgReshape( globals->get_options()->get_xsize(),
|
||||||
globals->get_options()->get_ysize() );
|
globals->get_options()->get_ysize() );
|
||||||
|
|
Loading…
Reference in a new issue