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 );
|
||||
for (int i=0;i<s->nEntries();i++) {
|
||||
FGAIModelEntity* en = s->getNextEntry();
|
||||
|
||||
if (en) {
|
||||
|
||||
if (en->m_type == "aircraft") {
|
||||
if ( !strcmp(en->m_type, "aircraft")) {
|
||||
createAircraft( en );
|
||||
|
||||
} else if (en->m_type == "ship") {
|
||||
} else if ( !strcmp(en->m_type, "ship")) {
|
||||
createShip( en );
|
||||
|
||||
} else if (en->m_type == "storm") {
|
||||
} else if ( !strcmp(en->m_type, "thunderstorm")) {
|
||||
createStorm( en );
|
||||
|
||||
} else if (en->m_type == "thermal") {
|
||||
} else if ( !strcmp(en->m_type, "thermal")) {
|
||||
createThermal( en );
|
||||
|
||||
} else if (en->m_type == "ballistic") {
|
||||
} else if ( !strcmp(en->m_type, "ballistic")) {
|
||||
createBallistic( en );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
return (0 < ot && ot < FGAIBase::MAX_OBJECTS) ? numObjects[ot] : numObjects[0];
|
||||
}
|
||||
|
||||
void processScenario( string filename );
|
||||
void processScenario( string &filename );
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
|
||||
FGAIScenario::FGAIScenario(string filename)
|
||||
FGAIScenario::FGAIScenario(string &filename)
|
||||
{
|
||||
int i;
|
||||
SGPath path( globals->get_fg_root() );
|
||||
|
|
|
@ -34,7 +34,7 @@ class FGAIScenario {
|
|||
|
||||
public:
|
||||
|
||||
FGAIScenario(string filename);
|
||||
FGAIScenario(string &filename);
|
||||
~FGAIScenario();
|
||||
|
||||
FGAIModelEntity* getNextEntry( void );
|
||||
|
|
|
@ -36,7 +36,7 @@ SG_USING_STD(string);
|
|||
|
||||
FGAIStorm::FGAIStorm(FGAIManager* mgr) {
|
||||
manager = mgr;
|
||||
_type_str = "storm";
|
||||
_type_str = "thunderstorm";
|
||||
_otype = otStorm;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue