Seems reasonable ... I've committed this to CVS.



On Jan 27, 2008 3:00 AM, Stuart Buchanan wrote:
Hi All,

As Csaba (?) pointed out a while back, the apparent reason for the MP chat
repetition bug is that we don't remove "dead" AI aircraft from the property tree,
so that the radar continues to work. Instead we just mark them as invalid.

This means that when a new aircraft joins as that index in the /ai/ subtree, The
MP chat system picks up the old message as belonging to them and replays it.

Csaba suggested a patch to the Nasal/multiplayer.nas to remove the messages on
consumption, but I'm not too keen on the display function removing data from the
properties tree - it might be needed elsewhere.

Instead, I'd like to clean the message properties when the node becomes invalid
in the code, as is done for a couple of other properties.

The patch below does this. Could someone review it and commit it to CVS?



Index: AIManager.cxx
RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIManager.cxx,v
retrieving revision 1.80
diff -u -r1.80 AIManager.cxx
--- AIManager.cxx       3 Aug 2007 18:02:33 -0000       1.80
+++ AIManager.cxx       27 Jan 2008 09:04:46 -0000
@@ -155,6 +155,8 @@
            props->setIntValue("id", -1);
            props->setBoolValue("radar/in-range", false);
            props->setIntValue("refuel/tanker", false);
+            props->setStringValue("sim/multiplay/chat", "");
+            props->setStringValue("sim/multiplay/transmission-freq-hz", "");

            ai_list_itr = ai_list.erase(ai_list_itr);
        } else {

Yahoo! Answers - Got a question? Someone out there knows the answer. Try it

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Flightgear-devel mailing list

Curtis Olson: