Hi Durk,
here the patch, that fg searches for multiplayer aircraft in AI/Aircraft
first.
Maik
Maik Justus schrieb am 14.11.2006 18:15:
Hi Durk,
the length of the new directory is (of course not) the most important
aspect. I will change the patch to search for multiplayer aircrafts in
AI/Aircraft first.
Maik
Durk Talsma schrieb am 14.11.2006 18:03:
Has anyone a good idea for the naming of this directory? (For
simplification of the string operations it should have the same length
as aircraft has).
Maik
Just a quick follow-up: I don't think that simplification of the string
operations is a good motivation for keeping the directory the same length as
the name of the main aircraft directory.
Index: AIBase.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIBase.cxx,v
retrieving revision 1.64.2.1
diff -u -p -r1.64.2.1 AIBase.cxx
--- AIBase.cxx 26 Nov 2006 12:04:43 -0000 1.64.2.1
+++ AIBase.cxx 12 Dec 2006 21:02:16 -0000
@@ -129,12 +129,22 @@ void FGAIBase::Transform() {
bool FGAIBase::init() {
if (!model_path.empty()) {
+ SGPath ai_path("AI");
+ ai_path.append(model_path);
try {
- model = load3DModel( globals->get_fg_root(), model_path, props,
- globals->get_sim_time_sec() );
+ model = load3DModel( globals->get_fg_root(), ai_path.str(), props,
+ globals->get_sim_time_sec() );
} catch (const sg_exception &e) {
model = NULL;
}
+ if (!model) {
+ try {
+ model = load3DModel( globals->get_fg_root(), model_path, props,
+ globals->get_sim_time_sec() );
+ } catch (const sg_exception &e) {
+ model = NULL;
+ }
+ }
}
if (model) {
aip.init( model );
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel