mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
* Changed various modules to not initialize timers unless the module is initialized. Ideally, the timers would not initialize unless the module was actually enabled, but Melanie's work on configuring module loading from a config file should make that unnecessary
* Wrapped the Bitmap class used to generate the world map tile in a using statement to dispose of it after the JPEG2000 data is created
This commit is contained in:
@@ -41,12 +41,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
{
|
||||
// private const bool m_enabled = false;
|
||||
|
||||
private Mutex m_createMutex = new Mutex(false);
|
||||
|
||||
private Timer m_timer = new Timer(500);
|
||||
private Mutex m_createMutex;
|
||||
private Timer m_timer;
|
||||
|
||||
private Dictionary<UUID,NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>();
|
||||
|
||||
private Dictionary<UUID,AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>();
|
||||
|
||||
// Timer vars.
|
||||
@@ -138,10 +136,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
scene.RegisterModuleInterface<INPCModule>(this);
|
||||
m_createMutex = new Mutex(false);
|
||||
|
||||
m_timer = new Timer(500);
|
||||
m_timer.Elapsed += m_timer_Elapsed;
|
||||
m_timer.Start();
|
||||
|
||||
scene.RegisterModuleInterface<INPCModule>(this);
|
||||
}
|
||||
|
||||
void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user