Torsten Dreyer wrote: > Looks like this is a chicken-egg problem: > > The chicken: > The model class in multiplayer.nas listens on the > property /ai/models/model-added and checks for all models the > property "valid" to be true. > > The egg: > When AIManager attaches a model, it first loads the model by calling > model->init(); > FGAIBase::init() calls FGAIBase::load3DModel() which calls > FGAIBase::initModel() which sets property /ai/models/model-added. (This > triggers the chicken, but "valid" is not yet set to true) > _AFTER_ model->init() in AIManager::atach() is finished, the property "valid" > in the /ai/models/multiplayer[n] is set to true. > > This causes new latest addition to the multiplayer list to be ignored. > > I think the behaviour of FGAIBase and AIManager is correct to set the "valid" > property to true after the initialization is complete. > I also think that the check for "valid" in the model class in multiplayer.nas > is required to stay there. > > I have just commited a patch for multiplayer.nas that ignores the "valid" > flag > for the latest pilot that has joined. > > Please check if this solves the problem. > > Torsten
Thanks for working this out Torsten. I suspected that the problem was related to the valid property, but didn't manage to get to the bottom of it. Is there any mileage in only setting the model-added property in the AIManager::attach() function after mode_init() is complete? -Stuart (been away for two weeks so only just catching up on developments) ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel