Property to toggle between preferred MP models
/sim/multiplay/use-detailed-models can be used to set whether we will prefer models from Aircraft/ (true) or from AI/ (false). Default (set in defaults.xml in fgdata) is true.
This commit is contained in:
parent
ea9ae959e4
commit
9de3672b62
2 changed files with 52 additions and 47 deletions
|
@ -134,6 +134,8 @@ FGAIManager::init() {
|
|||
globals->get_commands()->addCommand("unload-scenario", this, &FGAIManager::unloadScenarioCommand);
|
||||
_environmentVisiblity = fgGetNode("/environment/visibility-m");
|
||||
|
||||
_mp_use_detailed_models = fgGetNode("/sim/multiplay/use-detailed-models", true);
|
||||
|
||||
// Create an (invisible) AIAircraft representation of the current
|
||||
// users's aircraft, that mimicks the user aircraft's behavior.
|
||||
|
||||
|
@ -311,8 +313,10 @@ FGAIManager::attach(FGAIBase *model)
|
|||
case FGAIBase::otAircraft:
|
||||
case FGAIBase::otStatic:
|
||||
modelPolicy = FGAIBase::PREFER_AI;
|
||||
break;
|
||||
case FGAIBase::otMultiplayer:
|
||||
modelPolicy = FGAIBase::PREFER_DATA;
|
||||
modelPolicy = this->_mp_use_detailed_models->getBoolValue() ? FGAIBase::PREFER_DATA : FGAIBase::PREFER_AI;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ private:
|
|||
SGPropertyNode_ptr wind_from_east_node;
|
||||
SGPropertyNode_ptr wind_from_north_node;
|
||||
SGPropertyNode_ptr _environmentVisiblity;
|
||||
SGPropertyNode_ptr _mp_use_detailed_models;
|
||||
|
||||
|
||||
ai_list_type ai_list;
|
||||
|
|
Loading…
Add table
Reference in a new issue