diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index fcfacc6..d139b25 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -44,15 +44,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | // private const bool m_enabled = false; | ||
48 | |||
49 | private Dictionary<UUID, NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>(); | 47 | private Dictionary<UUID, NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>(); |
50 | private Dictionary<UUID, AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>(); | 48 | private Dictionary<UUID, AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>(); |
51 | 49 | ||
52 | public void Initialise(Scene scene, IConfigSource source) | 50 | public void Initialise(Scene scene, IConfigSource source) |
53 | { | 51 | { |
54 | scene.RegisterModuleInterface<INPCModule>(this); | 52 | IConfig config = source.Configs["NPC"]; |
55 | scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; | 53 | |
54 | if (config != null && config.GetBoolean("Enabled", false)) | ||
55 | { | ||
56 | scene.RegisterModuleInterface<INPCModule>(this); | ||
57 | scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; | ||
58 | } | ||
56 | } | 59 | } |
57 | 60 | ||
58 | public void HandleOnSignificantClientMovement(ScenePresence presence) | 61 | public void HandleOnSignificantClientMovement(ScenePresence presence) |