Am Sonntag, den 12.11.2006, 21:40 +0100 schrieb Maik Justus:
> Hi,
> 
> I have programmed a small patch, which tries first to load AI-aircraft 
> from Ai_crafts instead of Aircrafts. It works fine and can help us to 
> save some memory.
> Which name for the alternative Aircraft directory would be good? (For 
> simplification of the string operations it should have the same length 
> as aircraft has).

I've made a detail- and texturesize reduced Version of some of my
aircraft (the bf109 and the ju52) for AI Use and static Display. I put
it into /Models/Geometry/ so I can use the same .ac model for both AI
and static. There is an -ai.xml file (uses Denes velocity based
animations), and a -static.xml file, to get the offsets right.

Greetings

Detlef

> The patch is only a proof of concept (no comments, just one check for 
> ...[2]=='r')...
> 
> Maik
> 
> Maik Justus schrieb:
> > Hi,
> >
> > I was thinking about he memory usage of the aircrafts. As multiplayer 
> > mode becomes more and more popular, more aircrafts are loaded into 
> > memory. If any AI-aircraft is not loaded directly from the Aircraft 
> > folder, but first from an AI-Aircraft folder and only if the aircraft 
> > isn't found there, the aircraft is loaded from the Aircraft folder, the 
> > memory usage can be minimized. We only have to copy the aircrafts with 
> > huge memory usage to this folder and rescale the textures (and maybe 
> > replace the .ac files by lower polygon versions).
> >
> > Maik
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job 
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Flightgear-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/flightgear-devel
> >
> >
> >   
> 
> einfaches Textdokument-Anlage (AIBase.cxx.diff)
> Index: AIBase.cxx
> ===================================================================
> RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIBase.cxx,v
> retrieving revision 1.64
> diff -u -p -r1.64 AIBase.cxx
> --- AIBase.cxx        6 Oct 2006 17:36:32 -0000       1.64
> +++ AIBase.cxx        12 Nov 2006 20:23:41 -0000
> @@ -128,11 +128,32 @@ void FGAIBase::Transform() {
>  bool FGAIBase::init() {
>  
>     if (!model_path.empty()) {
> -     try {
> -       model = load3DModel( globals->get_fg_root(), model_path, props,
> +     if (model_path[2]=='r')
> +     {
> +       model_path[2]='_';
> +       try {
> +         model = load3DModel( globals->get_fg_root(), model_path, props,
>                              globals->get_sim_time_sec() );
> -     } catch (const sg_exception &e) {
> -       model = NULL;
> +       } catch (const sg_exception &e) {
> +         model = NULL;
> +       }
> +       if (!model) 
> +       {
> +         model_path[2]='r';
> +         try {
> +           model = load3DModel( globals->get_fg_root(), model_path, props,
> +                            globals->get_sim_time_sec() );
> +         } catch (const sg_exception &e) {
> +           model = NULL;
> +         }
> +       }
> +     } else {
> +       try {
> +         model = load3DModel( globals->get_fg_root(), model_path, props,
> +                            globals->get_sim_time_sec() );
> +       } catch (const sg_exception &e) {
> +         model = NULL;
> +       }
>       }
>     }
>     if (model) {
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________ Flightgear-devel mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to