- if (!strcmp(entry->getStringValue("class", ""), "light")) {
- PERF_STRUCT ps = {2.0, 2.0, 450.0, 1000.0, 70.0, 80.0, 100.0, 80.0, 60.0};
- ai_plane->SetPerformance(ps);
- } else if (!strcmp(entry->getStringValue("class", ""), "ww2_fighter")) {
- PERF_STRUCT ps = {4.0, 2.0, 3000.0, 1500.0, 110.0, 180.0, 250.0, 200.0, 100.0};
- ai_plane->SetPerformance(ps);
- } else if (!strcmp(entry->getStringValue("class", ""), "jet_transport")) {
- PERF_STRUCT ps = {5.0, 2.0, 3000.0, 1500.0, 140.0, 300.0, 430.0, 300.0, 130.0};
- ai_plane->SetPerformance(ps);
- } else if (!strcmp(entry->getStringValue("class", ""), "jet_fighter")) {
- PERF_STRUCT ps = {7.0, 3.0, 4000.0, 2000.0, 150.0, 350.0, 500.0, 350.0, 150.0};
- ai_plane->SetPerformance(ps);
+
+ string model_class = entry->getStringValue("class", "");
+ if (model_class == "light") {
+ ai_plane->SetPerformance(&FGAIAircraft::settings[FGAIAircraft::LIGHT]);
+
+ } else if (model_class == "ww2_fighter") {
+ ai_plane->SetPerformance(&FGAIAircraft::settings[FGAIAircraft::WW2_FIGHTER]);
+
+ } else if (model_class == "jet_transport") {
+ ai_plane->SetPerformance(&FGAIAircraft::settings[FGAIAircraft::JET_TRANSPORT]);
+
+ } else if (model_class == "jet_fighter") {
+ ai_plane->SetPerformance(&FGAIAircraft::settings[FGAIAircraft::JET_FIGHTER]);