1
0
Fork 0

Fix for a crash reported by Maik Justus.

This commit is contained in:
durk 2006-11-14 20:08:50 +00:00
parent 06dc1d6afa
commit e389bed31f
2 changed files with 6 additions and 5 deletions

View file

@ -165,14 +165,14 @@ FGAIBase::load3DModel(const string& fg_root,
// SetModel as in ATC/AIEntity.cxx
osg::Group* personality_branch = new osg::Group;
model = manager->getModel(path);
if (!(model)) {
//model = manager->getModel(path);
//if (!(model)) {
model = sgLoad3DModel(fg_root,
path,
prop_root,
sim_time_sec);
manager->setModel(path, model.get());
}
// manager->setModel(path, model.get());
//}
personality_branch->addChild( model.get() );
return personality_branch;

View file

@ -765,6 +765,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
SG_LOG(SG_GENERAL, SG_ALERT, "AI error: Trying to access non-existing aircraft in FGGroundNetwork::checkSpeedAdjustment");
}
current = i;
closest = current;
previousInstruction = current->getSpeedAdjustment();
double mindist = HUGE;
if (activeTraffic.size())
@ -774,7 +775,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
lat,
alt);
//TrafficVector iterator closest;
closest = current;
//closest = current;
for (TrafficVectorIterator i = activeTraffic.begin();
i != activeTraffic.end(); i++)
{