I did a little tweaking to the multiplayer code to allow you to use a
startup option "--ai-gliders-only" to, by default, load all other
players as the default-model. I accomplish that by inserting some
garbage directory in front of the model path, that way the model loading
functions just treats it as a missing file and loads the default glider
model. Nothing elaborate had to be done, and the MP Pilot list shows the
correct model name but all in orange. I've added a 2nd checkbox next to
ignore to select if you want to load that players actual model. If you
dont have it nothing changes. I was thinking about making the inverse,
of without specifying the startup option, everyones checkbox is marked
already, and then you can selectively unload.. however I dont think FG
truly frees up any memory at this time as a result, but maybe I'm wrong.
Basically it was just to let me and others be able to fly in populated
areas, still see each other, and not have our computers meltdown from
loading 14 different jumbo jets.

A patch for FG, and a replacement for fgdata/Nasal/multiplayer.nas is
attached.

--Dan
diff --git src/AIModel/AIBase.hxx src/AIModel/AIBase.hxx
index f09a96e..a3c96b9 100644
--- src/AIModel/AIBase.hxx
+++ src/AIModel/AIBase.hxx
@@ -323,7 +323,7 @@ inline void FGAIBase::setManager(FGAIManager* mgr, SGPropertyNode* p) {
 }
 
 inline void FGAIBase::setPath(const char* model ) {
-    model_path.append(model);
+    model_path.assign(model);
 }
 
 inline void FGAIBase::setSMPath(const string& p) {
diff --git src/AIModel/AIMultiplayer.cxx src/AIModel/AIMultiplayer.cxx
index caa45ce..b81d0e4 100644
--- src/AIModel/AIMultiplayer.cxx
+++ src/AIModel/AIMultiplayer.cxx
@@ -64,6 +64,8 @@ bool FGAIMultiplayer::init(bool search_in_AI_path) {
         //	   cout << "isTanker " << isTanker << " " << mCallSign <<endl;
     }
 
+    RealModel = false;
+
     // load model
     bool result = FGAIBase::init(search_in_AI_path);
     // propagate installation state (used by MP pilot list)
@@ -80,6 +82,9 @@ void FGAIMultiplayer::bind() {
     props->tie("controls/invisible",
         SGRawValuePointer<bool>(&invisible));
 
+    props->tie("sim/model/show",
+        SGRawValuePointer<bool>(&RealModel));
+
 #define AIMPROProp(type, name) \
 SGRawValueMethods<FGAIMultiplayer, type>(*this, &FGAIMultiplayer::get##name)
 
@@ -108,6 +113,7 @@ void FGAIMultiplayer::unbind() {
     props->untie("controls/invisible");
     props->untie("refuel/contact");
     props->untie("tanker");
+    props->untie("sim/model/show");
 
 }
 
diff --git src/AIModel/AIMultiplayer.hxx src/AIModel/AIMultiplayer.hxx
index 4c8d50a..6d0772c 100644
--- src/AIModel/AIMultiplayer.hxx
+++ src/AIModel/AIMultiplayer.hxx
@@ -64,6 +64,8 @@ public:
 
   virtual const char* getTypeString(void) const { return "multiplayer"; }
 
+  bool getRealModel(void) { return RealModel; }
+  void setRealModel(bool val) { RealModel = val; }
 private:
 
   // Automatic sorting of motion data according to its timestamp
@@ -90,6 +92,9 @@ private:
   SGPropertyNode_ptr refuel_node;
   bool isTanker;
   bool contact;          // set if this tanker is within fuelling range
+
+  // Show glider or players real model
+  bool RealModel;
 };
 
 #endif  // _FG_AIMultiplayer_HXX
diff --git src/Main/options.cxx src/Main/options.cxx
index 00624af..bc56ece 100644
--- src/Main/options.cxx
+++ src/Main/options.cxx
@@ -1355,6 +1355,7 @@ struct OptionDesc {
     {"metar",                        true,  OPTION_STRING, "/environment/metar/data", false, "", 0 },
     {"disable-ai-models",            false, OPTION_BOOL,   "/sim/ai/enabled", false, "", 0 },
     {"enable-ai-models",             false, OPTION_BOOL,   "/sim/ai/enabled", true, "", 0 },
+    {"ai-gliders-only",              false, OPTION_BOOL,   "/sim/ai/gliders-only", true, "", 0 },
     {"disable-ai-traffic",           false, OPTION_BOOL,   "/sim/traffic-manager/enabled", false, "", 0 },
     {"enable-ai-traffic",            false, OPTION_BOOL,   "/sim/traffic-manager/enabled", true,  "", 0 },
     {"disable-freeze",               false, OPTION_BOOL,   "/sim/freeze/master", false, "", 0 },
diff --git src/MultiPlayer/multiplaymgr.cxx src/MultiPlayer/multiplaymgr.cxx
index 123317c..3e5ff17 100644
--- src/MultiPlayer/multiplaymgr.cxx
+++ src/MultiPlayer/multiplaymgr.cxx
@@ -1097,7 +1097,48 @@ FGMultiplayMgr::ProcessPosMsg(const FGMultiplayMgr::MsgBuf& Msg,
             << "Position message received with insufficient data" );
     return;
   }
+
+  FGAIMultiplayer* mp = getMultiplayer(MsgHdr->Callsign);
   const T_PositionMsg* PosMsg = Msg.posMsg();
+
+  // Gliders only, check if we should reload model
+  SGPropertyNode *g = fgGetNode("/sim/ai/gliders-only", true);
+  if(g->getBoolValue() == true) {
+     if(mp) {
+        if((mp->getRealModel() == true) && (strncmp(mp->_getPath(),
+                                                        "dnl/", 4) == 0)) {
+                MultiPlayerMap::iterator it = mMultiPlayerMap.begin();
+                while(it != mMultiPlayerMap.end()) {
+                    if(strcmp(it->second->_getCallsign(), MsgHdr->Callsign) == 0) {
+                        std::string name = it->first;
+                        it->second->setDie(true);
+                        it->second->update(0.0);
+                        mMultiPlayerMap.erase(it);
+                        it = mMultiPlayerMap.upper_bound(name);
+                    } else {
+                        ++it;
+                    }
+                }
+                mp = addMultiplayer(MsgHdr->Callsign, PosMsg->Model, 1);
+        } else if((mp->getRealModel() != true) && (strncmp(mp->_getPath(),
+                                                           "dnl/", 4) != 0)) {
+                MultiPlayerMap::iterator it = mMultiPlayerMap.begin();
+                while(it != mMultiPlayerMap.end()) {
+                    if(strcmp(it->second->_getCallsign(), MsgHdr->Callsign) == 0) {
+                        std::string name = it->first;
+                        it->second->setDie(true);
+                        it->second->update(0.0);
+                        mMultiPlayerMap.erase(it);
+                        it = mMultiPlayerMap.upper_bound(name);
+                    } else {
+                        ++it;
+                    }
+                }
+                mp = addMultiplayer(MsgHdr->Callsign, PosMsg->Model, 0);
+        }
+     }
+  }
+
   FGExternalMotionData motionInfo;
   motionInfo.time = XDR_decode_double(PosMsg->time);
   motionInfo.lag = XDR_decode_double(PosMsg->lag);
@@ -1234,9 +1275,13 @@ FGMultiplayMgr::ProcessPosMsg(const FGMultiplayMgr::MsgBuf& Msg,
     }
   }
  noprops:
-  FGAIMultiplayer* mp = getMultiplayer(MsgHdr->Callsign);
-  if (!mp)
-    mp = addMultiplayer(MsgHdr->Callsign, PosMsg->Model);
+  if (!mp) {
+	if(g->getBoolValue() == true) {
+	    mp = addMultiplayer(MsgHdr->Callsign, PosMsg->Model, 0);
+	} else {
+		mp = addMultiplayer(MsgHdr->Callsign, PosMsg->Model, 1);
+	}
+  }
   mp->addMotionInfo(motionInfo, stamp);
 } // FGMultiplayMgr::ProcessPosMsg()
 //////////////////////////////////////////////////////////////////////
@@ -1299,13 +1344,21 @@ FGMultiplayMgr::FillMsgHdr(T_MsgHdr *MsgHdr, int MsgId, unsigned _len)
 
 FGAIMultiplayer*
 FGMultiplayMgr::addMultiplayer(const std::string& callsign,
-                               const std::string& modelName)
+                               const std::string& modelName, bool real)
 {
   if (0 < mMultiPlayerMap.count(callsign))
-    return mMultiPlayerMap[callsign].get();
+	return mMultiPlayerMap[callsign].get();
 
   FGAIMultiplayer* mp = new FGAIMultiplayer;
-  mp->setPath(modelName.c_str());
+
+  // Add with real model or bogus model (glider)
+  if(real) {
+	  mp->setPath(modelName.c_str());
+  } else {
+      string m;
+      m = "dnl/" + modelName;
+      mp->setPath(m.c_str());
+  }
   mp->setCallSign(callsign);
   mMultiPlayerMap[callsign] = mp;
 
diff --git src/MultiPlayer/multiplaymgr.hxx src/MultiPlayer/multiplaymgr.hxx
index 42444f0..d7c76c3 100644
--- src/MultiPlayer/multiplaymgr.hxx
+++ src/MultiPlayer/multiplaymgr.hxx
@@ -78,7 +78,7 @@ private:
 
   union MsgBuf;
   FGAIMultiplayer* addMultiplayer(const std::string& callsign,
-                                  const std::string& modelName);
+                                  const std::string& modelName, bool real);
   FGAIMultiplayer* getMultiplayer(const std::string& callsign);
   void FillMsgHdr(T_MsgHdr *MsgHdr, int iMsgId, unsigned _len = 0u);
   void ProcessPosMsg(const MsgBuf& Msg, const simgear::IPAddress& SenderAddress,
# Multiplayer
# ===========
#
# 1) Display chat messages from other aircraft to
#    the screen using screen.nas
#
# 2) Display a complete history of chat via dialog.
#
# 3) Allow chat messages to be written by the user.


var is_active = func getprop("/sim/multiplay/txport") or 
getprop("/sim/multiplay/rxport");


var lastmsg = {};
var ignore = {};
var showmodel = {};
var msg_loop_id = 0;
var msg_timeout = 0;

var check_messages = func(loop_id) {
    if (loop_id != msg_loop_id) return;
    foreach (var mp; values(model.callsign)) {
        var msg = mp.node.getNode("sim/multiplay/chat", 1).getValue();
        if (msg and msg != lastmsg[mp.callsign]) {
            if (!contains(ignore, mp.callsign))
                echo_message(mp.callsign, msg);
            lastmsg[mp.callsign] = msg;
        }
    }
    settimer(func check_messages(loop_id), 1);
}

var echo_message = func(callsign, msg) {
    msg = string.trim(string.replace(msg, "\n", " "));

    # Only prefix with the callsign if the message doesn't already include it.
    if (find(callsign, msg) < 0)
        msg = callsign ~ ": " ~ msg;

    setprop("/sim/messages/mp-plane", msg);

    # Add the chat to the chat history.
    if (var history = getprop("/sim/multiplay/chat-history"))
        msg = history ~ "\n" ~ msg;

    setprop("/sim/multiplay/chat-history", msg);
}

var timeout_handler = func()
{
    var t = props.globals.getNode("/sim/time/elapsed-sec").getValue();
    if (t >= msg_timeout)
    {
        msg_timeout = 0;
        setprop("/sim/multiplay/chat", "");
    }
    else
        settimer(timeout_handler, msg_timeout - t);
}

var chat_listener = func(n)
{
    var msg = n.getValue();
    if (msg)
    {
        # ensure we see our own messages.
        echo_message(getprop("/sim/multiplay/callsign"), msg);

        # set expiry time
        if (msg_timeout == 0)
            settimer(timeout_handler, 10); # need new timer
        msg_timeout = 10 + 
props.globals.getNode("/sim/time/elapsed-sec").getValue();
    }
}

settimer(func {
    if (is_active()) {
        if (getprop("/sim/multiplay/write-message-log")) {
            var ac = getprop("/sim/aircraft");
            var cs = getprop("/sim/multiplay/callsign");
            var apt = airportinfo().id;
            var t = props.globals.getNode("/sim/time/real").getValues();
            var file = string.normpath(getprop("/sim/fg-home") ~ 
"/mp-message.log");

            var f = io.open(file, "a");
            io.write(f, sprintf("\n=====  %s %04d/%02d/%02d\t%s\t%s\t%s\n",
                    ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", 
"Sat"][t.weekday],
                    t.year, t.month, t.day, apt, ac, cs));

            setlistener("/sim/signals/exit", func io.write(f, "=====\n") and 
io.close(f));
            setlistener("/sim/messages/mp-plane", func(n) {
                io.write(f, sprintf("%02d:%02d  %s\n",
                        getprop("/sim/time/real/hour"),
                        getprop("/sim/time/real/minute"),
                        n.getValue()));
                io.flush(f);
            });
        }
        check_messages(msg_loop_id += 1);
    }

    # Call-back to ensure we see our own messages.
    setlistener("/sim/multiplay/chat", chat_listener);
}, 1);


# Message composition function, activated using the - key.
var prefix = "Chat Message:";
var input = "";
var kbdlistener = nil;

var compose_message = func(msg = "")
{
  input = prefix ~ msg;
  gui.popupTip(input, 1000000);

  kbdlistener = setlistener("/devices/status/keyboard/event", func (event) {
    var key = event.getNode("key");

    # Only check the key when pressed.
    if (!event.getNode("pressed").getValue())
      return;

    if (handle_key(key.getValue()))
      key.setValue(-1);           # drop key event
  });
}

var handle_key = func(key)
{
  if (key == `\n` or key == `\r`)
  {
    # CR/LF -> send the message

    # Trim off the prefix
    input = substr(input, size(prefix));
    # Send the message and switch off the listener.
    setprop("/sim/multiplay/chat", input);
    removelistener(kbdlistener);
    gui.popdown();
    return 1;
  }
  elsif (key == 8)
  {
    # backspace -> remove a character

    if (size(input) > size(prefix))
    {
      input = substr(input, 0, size(input) - 1);
      gui.popupTip(input, 1000000);
    }

    # Always handle key so excessive backspacing doesn't toggle the heading 
autopilot
    return 1;
  }
  elsif (key == 27)
  {
    # escape -> cancel
    removelistener(kbdlistener);
    gui.popdown();
    return 1;
  }
  elsif ((key > 31) and (key < 128))
  {
    # Normal character - add it to the input
    input ~= chr(key);
    gui.popupTip(input, 1000000);
    return 1;
  }
  else
  {
    # Unknown character - pass through
    return 0;
  }
}



# multiplayer.dialog.show() -- displays pilot list dialog
#
var PILOTSDLG_RUNNING = 0;

var dialog = {
    init: func(x = nil, y = nil) {
        me.x = x;
        me.y = y;
        me.bg = [0, 0, 0, 0.3];    # background color
        me.fg = [[0.9, 0.9, 0.2, 1], [1, 1, 1, 1], [1, 0.5, 0, 1]]; # 
alternative active & disabled color
        me.unit = 1;
        me.toggle_unit();          # set to imperial
        #
        # "private"
        var font = { name: "FIXED_8x13" };
        me.header = [" callsign", "model", "brg", func dialog.dist_hdr, func 
dialog.alt_hdr ~ " ", "ignore" ~ " ", "model" ~ " "];
        me.columns = [
            { type: "text", property: "callsign",    format: " %s",    label: 
"-----------",    halign: "fill" },
            { type: "text", property: "model-short", format: "%s",     label: 
"--------------", halign: "fill" },
            { type: "text", property: "bearing-to",  format: " %3.0f", label: 
"----",           halign: "right", font: font },
            { type: "text", property: func dialog.dist_node, format:" %8.2f", 
label: "---------", halign: "right", font: font },
            { type: "text", property: func dialog.alt_node,  format:" %7.0f", 
label: "---------", halign: "right", font: font },
            { type: "checkbox", property: "controls/invisible", callback: 
"multiplayer.dialog.toggle_ignore",
               argprop: "callsign", label: "---------", halign: "right", font: 
font },
            { type: "checkbox", property: "sim/model/show", callback: 
"multiplayer.dialog.toggle_model", 
              argprop: "callsign", label: "---------", halign: "right", font: 
font },
        ];
        me.cs_warnings = {};
        me.name = "who-is-online";
        me.dialog = nil;
        me.loopid = 0;

        me.listeners=[];
        append(me.listeners, setlistener("/sim/startup/xsize", func 
me._redraw_()));
        append(me.listeners, setlistener("/sim/startup/ysize", func 
me._redraw_()));
        append(me.listeners, setlistener("/sim/signals/reinit-gui", func 
me._redraw_()));
        append(me.listeners, setlistener("/sim/signals/multiplayer-updated", 
func me._redraw_()));
    },
    create: func {
        if (me.dialog != nil)
            me.close();

        me.dialog = gui.dialog[me.name] = gui.Widget.new();
        me.dialog.set("name", me.name);
        me.dialog.set("dialog-name", me.name);
        if (me.x != nil)
            me.dialog.set("x", me.x);
        if (me.y != nil)
            me.dialog.set("y", me.y);

        me.dialog.set("layout", "vbox");
        me.dialog.set("default-padding", 0);

        me.dialog.setColor(me.bg[0], me.bg[1], me.bg[2], me.bg[3]);

        var titlebar = me.dialog.addChild("group");
        titlebar.set("layout", "hbox");

        var w = titlebar.addChild("button");
        w.node.setValues({ "pref-width": 16, "pref-height": 16, legend: 
me.unit_button, default: 0 });
        w.setBinding("nasal", "multiplayer.dialog.toggle_unit(); 
multiplayer.dialog._redraw_()");

        titlebar.addChild("empty").set("stretch", 1);
        titlebar.addChild("text").set("label", "Pilots: ");

        var p = titlebar.addChild("text");
        p.node.setValues({ label: "---", live: 1, format: "%d", property: 
"ai/models/num-players" });
        titlebar.addChild("empty").set("stretch", 1);

        var w = titlebar.addChild("button");
        w.node.setValues({ "pref-width": 16, "pref-height": 16, legend: "", 
default: 0 });
        w.setBinding("nasal", "multiplayer.dialog.del()");

        me.dialog.addChild("hrule");

        var content = me.dialog.addChild("group");
        content.set("layout", "table");
        content.set("default-padding", 0);

        var row = 0;
        var col = 0;
        foreach (var h; me.header) {
            var w = content.addChild("text");
            var l = typeof(h) == "func" ? h() : h;
            w.node.setValues({ "label": l, "row": row, "col": col, halign: 
me.columns[col].halign });
            w = content.addChild("hrule");
            w.node.setValues({ "row": row + 1, "col": col });
            col += 1;
        }
        row += 2;
        var odd = 1;
        foreach (var mp; model.list) {
            var col = 0;
            var color = mp.node.getNode("model-installed").getValue() ? 
me.fg[odd = !odd] : me.fg[2];
            foreach (var column; me.columns) {
                var p = typeof(column.property) == "func" ? column.property() : 
column.property;
                var w = nil;
                if (column.type == "text") {
                    w = content.addChild("text");
                    w.node.setValues(column);
                } elsif (column.type == "checkbox") {
                    w = content.addChild("checkbox");
                    w.setBinding("nasal", column.callback ~ "(getprop(\"" ~ 
mp.root ~ "/" ~ column.argprop ~ "\"))");
                }
                w.setColor(color[0], color[1], color[2], color[3]);
                w.node.setValues({ row: row, col: col, live: 1, property: 
mp.root ~ "/" ~ p });
                col += 1;
            }
            row += 1;
        }
        if (me.x != nil)
            me.dialog.set("x", me.x);
        if (me.y != nil)
            me.dialog.set("y", me.y);
        me.update(me.loopid += 1);
        fgcommand("dialog-new", me.dialog.prop());
        fgcommand("dialog-show", me.dialog.prop());
    },
    update: func(id) {
        id == me.loopid or return;
        var self = geo.aircraft_position();
        foreach (var mp; model.list) {
            var n = mp.node;
            var x = n.getNode("position/global-x").getValue();
            var y = n.getNode("position/global-y").getValue();
            var z = n.getNode("position/global-z").getValue();
            var ac = geo.Coord.new().set_xyz(x, y, z);
            var distance = nil;
            call(func distance = self.distance_to(ac), nil, var err = []);
            if ((size(err))or(distance==nil)) {
                # Oops, have errors. Bogus position data (and distance==nil).
                if (me.cs_warnings[mp.callsign]!=1) {
                    # report each callsign once only (avoid cluttering)
                    me.cs_warnings[mp.callsign] = 1;
                    print("Received invalid position data: " ~ 
debug._error(mp.callsign));
                }
                #    debug.printerror(err);
                #    debug.dump(self, ac, mp);
                #    debug.tree(mp.node);
            }
            else
            {
                # Node with valid position data (and "distance!=nil").
                n.setValues({
                    "model-short": n.getNode("model-installed").getValue() ? 
mp.model : "[" ~ mp.model ~ "]",
                    "bearing-to": self.course_to(ac),
                    "distance-to-km": distance / 1000.0,
                    "distance-to-nm": distance * M2NM,
                    "position/altitude-m": 
n.getNode("position/altitude-ft").getValue() * FT2M,
                    "controls/invisible": contains(ignore, mp.callsign),
                    "sim/model/show": contains(showmodel, mp.callsign),
                });
            }
        }
        if (PILOTSDLG_RUNNING)
            settimer(func me.update(id), 1, 1);
    },
    _redraw_: func {
        if (me.dialog != nil) {
            me.close();
            me.create();
        }
    },
    toggle_unit: func {
        me.unit = !me.unit;
        if (me.unit) {
            me.alt_node = "position/altitude-m";
            me.alt_hdr = "alt-m";
            me.dist_hdr = "dist-km";
            me.dist_node = "distance-to-km";
            me.unit_button = "IM";
        } else {
            me.alt_node = "position/altitude-ft";
            me.dist_node = "distance-to-nm";
            me.alt_hdr = "alt-ft";
            me.dist_hdr = "dist-nm";
            me.unit_button = "SI";
        }
    },
    toggle_ignore: func (callsign) {
        if (contains(ignore, callsign)) {
            delete(ignore, callsign);
        } else {
            ignore[callsign] = 1;
        }
    },
    toggle_model: func (callsign) {
        if(contains(showmodel, callsign)) {
                delete(showmodel, callsign);
        } else {
                showmodel[callsign] = 1;
        }
    },
    close: func {
        if (me.dialog != nil) {
            me.x = me.dialog.prop().getNode("x").getValue();
            me.y = me.dialog.prop().getNode("y").getValue();
        }
        fgcommand("dialog-close", me.dialog.prop());
    },
    del: func {
        PILOTSDLG_RUNNING = 0;
        me.close();
        foreach (var l; me.listeners)
            removelistener(l);
        delete(gui.dialog, me.name);
    },
    show: func {
        if (!PILOTSDLG_RUNNING) {
            PILOTSDLG_RUNNING = 1;
            me.init(-2, -2);
            me.create();
            me.update(me.loopid += 1);
        }
    },
    toggle: func {
        if (!PILOTSDLG_RUNNING)
            me.show();
        else
            me.del();
    },
};



# Autonomous singleton class that monitors multiplayer aircraft,
# maintains data in various structures, and raises signal
# "/sim/signals/multiplayer-updated" whenever an aircraft
# joined or left. Available data containers are:
#
#   multiplayer.model.data:        hash, key := /ai/models/* path
#   multiplayer.model.callsign     hash, key := callsign
#   multiplayer.model.list         vector, sorted alphabetically (ASCII, case 
insensitive)
#
# All of them contain hash entries of this form:
#
# {
#    callsign: "BiMaus",
#    path: "Aircraft/bo105/Models/bo105.xml",      # relative file path
#    root: "/ai/models/multiplayer[4]",            # root property
#    node: {...},        # root property as props.Node hash
#    model: "bo105",     # model name (extracted from path)
#    sort: "bimaus",     # callsign in lower case (for sorting)
# }
#
var model = {
    init: func {
        me.L = [];
        append(me.L, setlistener("ai/models/model-added", func(n) {
            # Defer update() to the next convenient time to allow the
            # new MP entry to become fully initialized.
            settimer(func me.update(n.getValue()), 0);
        }));
        append(me.L, setlistener("ai/models/model-removed", func(n) {
            # Defer update() to the next convenient time to allow the
            # old MP entry to become fully deactivated.
            settimer(func me.update(n.getValue()), 0);
        }));
        me.update();
    },
    update: func(n = nil) {
        var changedNode = props.globals.getNode( n, 1 );
        if (n != nil and changedNode.getName() != "multiplayer")
            return;

        me.data = {};
        me.callsign = {};

        foreach (var n; props.globals.getNode("ai/models", 
1).getChildren("multiplayer")) {
            if (!n.getNode("valid").getValue())
                continue;

            if ((var callsign = n.getNode("callsign")) == nil or !(callsign = 
callsign.getValue()))
                continue;
            if (!(callsign = string.trim(callsign)))
                continue;

            var path = n.getNode("sim/model/path").getValue();
            var model = split(".", split("/", path)[-1])[0];
            model = me.remove_suffix(model, "-model");
            model = me.remove_suffix(model, "-anim");

            var root = n.getPath();
            var data = { node: n, callsign: callsign, model: model, root: root,
                    sort: string.lc(callsign) };

            me.data[root] = data;
            me.callsign[callsign] = data;
        }

        me.list = sort(values(me.data), func(a, b) cmp(a.sort, b.sort));

        setprop("ai/models/num-players", size(me.list));
        setprop("sim/signals/multiplayer-updated", 1);
    },
    remove_suffix: func(s, x) {
        var len = size(x);
        if (substr(s, -len) == x)
            return substr(s, 0, size(s) - len);
        return s;
    },
};


_setlistener("sim/signals/nasal-dir-initialized", func model.init());


------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to