update so that distances aren't required in the config file

afrisby
Sean Dague 2007-10-22 03:22:27 +00:00
parent 8e4748d914
commit e0f43cad4b
1 changed files with 7 additions and 4 deletions

View File

@ -58,10 +58,13 @@ namespace OpenSim.Region.Environment.Modules
public void Initialise(Scene scene, Nini.Config.IConfigSource config) public void Initialise(Scene scene, Nini.Config.IConfigSource config)
{ {
// wrap this in a try block so that defaults will work if
m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance"); // the config file doesn't specify otherwise.
m_saydistance = config.Configs["Chat"].GetInt("say_distance"); try {
m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance"); m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance);
m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance);
m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance);
} catch (Exception e) {}
if (!m_scenes.Contains(scene)) if (!m_scenes.Contains(scene))
{ {