Make the scenerio's work again (now for real) and a small number of updates.
This commit is contained in:
parent
4b5d84d7fb
commit
1974be7faf
5 changed files with 10 additions and 11 deletions
|
@ -288,26 +288,25 @@ void FGAIManager::processThermal( FGAIThermal* thermal ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FGAIManager::processScenario( string filename ) {
|
void FGAIManager::processScenario( string &filename ) {
|
||||||
FGAIScenario* s = new FGAIScenario( filename );
|
FGAIScenario* s = new FGAIScenario( filename );
|
||||||
for (int i=0;i<s->nEntries();i++) {
|
for (int i=0;i<s->nEntries();i++) {
|
||||||
FGAIModelEntity* en = s->getNextEntry();
|
FGAIModelEntity* en = s->getNextEntry();
|
||||||
|
|
||||||
if (en) {
|
if (en) {
|
||||||
|
if ( !strcmp(en->m_type, "aircraft")) {
|
||||||
if (en->m_type == "aircraft") {
|
|
||||||
createAircraft( en );
|
createAircraft( en );
|
||||||
|
|
||||||
} else if (en->m_type == "ship") {
|
} else if ( !strcmp(en->m_type, "ship")) {
|
||||||
createShip( en );
|
createShip( en );
|
||||||
|
|
||||||
} else if (en->m_type == "storm") {
|
} else if ( !strcmp(en->m_type, "thunderstorm")) {
|
||||||
createStorm( en );
|
createStorm( en );
|
||||||
|
|
||||||
} else if (en->m_type == "thermal") {
|
} else if ( !strcmp(en->m_type, "thermal")) {
|
||||||
createThermal( en );
|
createThermal( en );
|
||||||
|
|
||||||
} else if (en->m_type == "ballistic") {
|
} else if ( !strcmp(en->m_type, "ballistic")) {
|
||||||
createBallistic( en );
|
createBallistic( en );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ public:
|
||||||
return (0 < ot && ot < FGAIBase::MAX_OBJECTS) ? numObjects[ot] : numObjects[0];
|
return (0 < ot && ot < FGAIBase::MAX_OBJECTS) ? numObjects[ot] : numObjects[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void processScenario( string filename );
|
void processScenario( string &filename );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FGAIScenario::FGAIScenario(string filename)
|
FGAIScenario::FGAIScenario(string &filename)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
SGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
|
|
|
@ -34,7 +34,7 @@ class FGAIScenario {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FGAIScenario(string filename);
|
FGAIScenario(string &filename);
|
||||||
~FGAIScenario();
|
~FGAIScenario();
|
||||||
|
|
||||||
FGAIModelEntity* getNextEntry( void );
|
FGAIModelEntity* getNextEntry( void );
|
||||||
|
|
|
@ -36,7 +36,7 @@ SG_USING_STD(string);
|
||||||
|
|
||||||
FGAIStorm::FGAIStorm(FGAIManager* mgr) {
|
FGAIStorm::FGAIStorm(FGAIManager* mgr) {
|
||||||
manager = mgr;
|
manager = mgr;
|
||||||
_type_str = "storm";
|
_type_str = "thunderstorm";
|
||||||
_otype = otStorm;
|
_otype = otStorm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue