From 2d1d8120f65b06202cf764e34e4dc2ee7284246b Mon Sep 17 00:00:00 2001 From: frohlich <frohlich> Date: Sat, 14 Mar 2009 12:27:12 +0000 Subject: [PATCH] Set the reference time the transform is meant for. Modified Files: src/AIModel/AICarrier.cxx src/AIModel/AIShip.cxx --- src/AIModel/AIShip.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx index 45413dea4..6f5fca38c 100644 --- a/src/AIModel/AIShip.cxx +++ b/src/AIModel/AIShip.cxx @@ -201,6 +201,9 @@ void FGAIShip::update(double dt) { // The cartesian position of the carrier in the wgs84 world SGVec3d cartPos = SGVec3d::fromGeod(pos); + // The simulation time this transform is meant for + aip.setReferenceTime(globals->get_sim_time_sec() + dt); + // Compute the velocity in m/s in the body frame aip.setBodyLinearVelocity(SGVec3d(0.51444444*speed, 0, 0));