I have discovered recently that plib has ulIsAbsolutePathName
in ul.lib so you can try this patch :
Index: model.cxx
===
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Model/model.cxx,v
retrieving revision 1.2
diff -u -r1.2 model.cxx
--- model.cxx 13 Oct 2002 10:43:57 - 1.2
+++ model.cxx 13 Oct 2002 11:59:10 -
@@ -11,6 +11,7 @@
#include plib/sg.h
#include plib/ssg.h
+#include plib/ul.h
#include simgear/compiler.h
#include simgear/debug/logstream.hxx
@@ -231,7 +232,7 @@
// Load the 3D aircraft object itself
SGPath xmlpath;
SGPath modelpath = path;
- if ( path[ 0 ] == '/' || path[ 0 ] == '\\' || ( isalpha( path[ 0 ] )
path[ 1 ] == ':' ) ) {
+ if ( ulIsAbsolutePathName( path.c_str() ) ) {
xmlpath = modelpath;
}
else {
Cheers,
-Fred
- Original Message -
From: David Megginson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 9:36 PM
Subject: Re: [Flightgear-devel] Loading static object problems.
Frederic Bouvier writes:
I noticed that textures for scenery static objects are not loaded
anymore for a few weeks. Static objects have absolute path while
random objects and aircraft have relative path but fgLoad3DModel
unconditionally prepend fg_root to the model path. This patch test
the beginning of the model path to choose if fg_root has to be
prepended to the model path.
I've added the patch as a temporary kludge, until we have time to fix
cross-platform path handling. It should appear in CVS shortly.
Thanks,
David
--
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel