Patch from Jim Wilson:
Fix for problem where an incorrect frame or two got slipped in while changing tiles. Corrections to authorship in file level comments.
This commit is contained in:
parent
d164d565c0
commit
7432b9c590
1 changed files with 9 additions and 6 deletions
|
@ -1,8 +1,9 @@
|
||||||
// location.hxx -- class for determining model location in the flightgear world.
|
// location.cxx -- class for determining model location in the flightgear world.
|
||||||
//
|
//
|
||||||
// Written by Jim Wilson, David Megginson, started April 2002.
|
// Written by Jim Wilson, David Megginson, started April 2002.
|
||||||
|
// Based largely on code by Curtis Olson and Norman Vine.
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002 Jim Wilson, David Megginson
|
// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU General Public License as
|
// modify it under the terms of the GNU General Public License as
|
||||||
|
@ -243,7 +244,7 @@ FGLocation::recalcPosition (double lon_deg, double lat_deg, double alt_ft) const
|
||||||
Point3D p = Point3D(lon_deg * SG_DEGREES_TO_RADIANS,
|
Point3D p = Point3D(lon_deg * SG_DEGREES_TO_RADIANS,
|
||||||
lat_geoc_rad,
|
lat_geoc_rad,
|
||||||
sea_level_radius_m);
|
sea_level_radius_m);
|
||||||
Point3D tmp = sgPolarToCart3d(p) - scenery.get_next_center();
|
Point3D tmp = sgPolarToCart3d(p) - scenery.get_center();
|
||||||
sgSetVec3(_zero_elev_view_pos, tmp[0], tmp[1], tmp[2]);
|
sgSetVec3(_zero_elev_view_pos, tmp[0], tmp[1], tmp[2]);
|
||||||
|
|
||||||
// Calculate the absolute view position
|
// Calculate the absolute view position
|
||||||
|
@ -258,9 +259,9 @@ FGLocation::recalcPosition (double lon_deg, double lat_deg, double alt_ft) const
|
||||||
// aka Relative View Position
|
// aka Relative View Position
|
||||||
sgdVec3 scenery_center;
|
sgdVec3 scenery_center;
|
||||||
sgdSetVec3(scenery_center,
|
sgdSetVec3(scenery_center,
|
||||||
scenery.get_next_center().x(),
|
scenery.get_center().x(),
|
||||||
scenery.get_next_center().y(),
|
scenery.get_center().y(),
|
||||||
scenery.get_next_center().z());
|
scenery.get_center().z());
|
||||||
sgdVec3 view_pos;
|
sgdVec3 view_pos;
|
||||||
sgdSubVec3(view_pos, _absolute_view_pos, scenery_center);
|
sgdSubVec3(view_pos, _absolute_view_pos, scenery_center);
|
||||||
sgSetVec3(_relative_view_pos, view_pos);
|
sgSetVec3(_relative_view_pos, view_pos);
|
||||||
|
@ -274,3 +275,5 @@ FGLocation::update (int dt)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue