don't assign the asset-server in domain by default

This commit is contained in:
Stephen Birarda 2015-08-26 12:36:48 -07:00
parent 9e842cae33
commit dc1f726283
3 changed files with 31 additions and 0 deletions

View file

@ -166,6 +166,21 @@
}
]
},
{
"name": "asset_server",
"label": "Asset Server",
"assignment-types": [3],
"settings": [
{
"name": "enabled",
"type": "checkbox",
"label": "Enabled",
"help": "Assigns an asset-server in your domain to serve files to clients via the ATP protocol (over UDP)",
"default": false,
"advanced": true
}
]
},
{
"name": "audio_env",
"label": "Audio Environment",

View file

@ -574,6 +574,20 @@ void DomainServer::populateDefaultStaticAssignmentsExcludingTypes(const QSet<Ass
&& defaultedType != Assignment::UNUSED_0
&& defaultedType != Assignment::UNUSED_1
&& defaultedType != Assignment::AgentType) {
if (defaultedType == Assignment::AssetServerType) {
// Make sure the asset-server is enabled before adding it here.
// Initially we do not assign it by default so we can test it in HF domains first
static const QString ASSET_SERVER_ENABLED_KEYPATH = "asset_server.enabled";
if (!_settingsManager.valueOrDefaultValueForKeyPath(ASSET_SERVER_ENABLED_KEYPATH).toBool()) {
// skip to the next iteration if asset-server isn't enabled
continue;
}
}
// type has not been set from a command line or config file config, use the default
// by clearing whatever exists and writing a single default assignment with no payload
Assignment* newAssignment = new Assignment(Assignment::CreateCommand, (Assignment::Type) defaultedType);

View file

@ -127,6 +127,8 @@ const char* Assignment::getTypeName() const {
return "avatar-mixer";
case Assignment::AgentType:
return "agent";
case Assignment::AssetServerType:
return "asset-server";
case Assignment::EntityServerType:
return "entity-server";
default: