Update of /cvsroot/gcblue/gcb_wx/src/database
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17709/src/database
Modified Files:
tcGenericDBObject.cpp
Log Message:
mission editor mode changes
Index: tcGenericDBObject.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** tcGenericDBObject.cpp 28 Jun 2005 02:51:34 -0000 1.23
--- tcGenericDBObject.cpp 18 Dec 2005 18:48:17 -0000 1.24
***************
*** 75,97 ****
* @return relative az of launcher n or 0 for default or if error
*/
! float tcGenericDBObject::GetLauncherAz(unsigned n)
{
- float az = 0;
-
if ((int)n >= mnNumLaunchers)
{
! fprintf(stderr, "Error - GetLauncherAz - bad launcher index\n");
! return az;
}
if (tc3DModel* model = Get3DModel())
{
! float az;
osg::Vec3 pos;
! model->GetLauncherInfo(n, pos, az);
}
!
! return az;
!
}
--- 75,98 ----
* @return relative az of launcher n or 0 for default or if error
*/
! osg::Vec2 tcGenericDBObject::GetLauncherAttitude(unsigned n)
{
if ((int)n >= mnNumLaunchers)
{
! fprintf(stderr, "Error - GetLauncherAttitude - bad launcher index\n");
! return osg::Vec2(0, 0);
}
if (tc3DModel* model = Get3DModel())
{
! float az, el;
osg::Vec3 pos;
! model->GetLauncherInfo(n, pos, az, el);
! return osg::Vec2(az, el);
}
! else
! {
! fprintf(stderr, "Error - GetLauncherAttitude - null model\n");
! return osg::Vec2(0, 0);
! }
}
***************
*** 112,118 ****
if (tc3DModel* model = Get3DModel())
{
! float az;
osg::Vec3 pos;
! model->GetLauncherInfo(n, pos, az);
p.x = pos.x();
p.y = pos.y();
--- 113,119 ----
if (tc3DModel* model = Get3DModel())
{
! float az, el;
osg::Vec3 pos;
! model->GetLauncherInfo(n, pos, az, el);
p.x = pos.x();
p.y = pos.y();
|