Exemple #1
0
        /// <summary>
        /// Creates a new World class, and a region to go with it.
        /// </summary>
        /// <param name="clientThreads">Dictionary to contain client threads</param>
        /// <param name="regionHandle">Region Handle for this region</param>
        /// <param name="regionName">Region Name for this region</param>
        public World(Dictionary<uint, SimClient> clientThreads, ulong regionHandle, string regionName)
        {
            try
            {
                updateLock = new Mutex(false);
                m_clientThreads = clientThreads;
                m_regionHandle = regionHandle;
                m_regionName = regionName;

                m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
                m_scripts = new Dictionary<string, ScriptFactory>();

                OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating new entitities instance");
                Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
                Avatars = new Dictionary<LLUUID, Avatar>();
                Prims = new Dictionary<LLUUID, Primitive>();

                OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap");
                TerrainManager = new TerrainManager(new SecondLife());
                Terrain = new TerrainEngine();
                Avatar.SetupTemplate("avatar-texture.dat");
                //	MainConsole.Instance.WriteLine("World.cs - Creating script engine instance");
                // Initialise this only after the world has loaded
                //	Scripts = new ScriptEngine(this);
                Avatar.LoadAnims();
                this.SetDefaultScripts();
                this.LoadScriptEngines();
            }
            catch (Exception e)
            {
                OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Constructor failed with exception " + e.ToString());
            }
        }
Exemple #2
0
        /// <summary>
        /// Creates a new World class, and a region to go with it.
        /// </summary>
        /// <param name="clientThreads">Dictionary to contain client threads</param>
        /// <param name="regionHandle">Region Handle for this region</param>
        /// <param name="regionName">Region Name for this region</param>
        public World(Dictionary <uint, SimClient> clientThreads, ulong regionHandle, string regionName)
        {
            try
            {
                updateLock      = new Mutex(false);
                m_clientThreads = clientThreads;
                m_regionHandle  = regionHandle;
                m_regionName    = regionName;

                m_scriptHandlers = new Dictionary <LLUUID, ScriptHandler>();
                m_scripts        = new Dictionary <string, ScriptFactory>();

                OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating new entitities instance");
                Entities = new Dictionary <libsecondlife.LLUUID, Entity>();
                Avatars  = new Dictionary <LLUUID, Avatar>();
                Prims    = new Dictionary <LLUUID, Primitive>();

                OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap");
                TerrainManager = new TerrainManager(new SecondLife());
                Terrain        = new TerrainEngine();
                Avatar.SetupTemplate("avatar-texture.dat");
                //	MainConsole.Instance.WriteLine("World.cs - Creating script engine instance");
                // Initialise this only after the world has loaded
                //	Scripts = new ScriptEngine(this);
                Avatar.LoadAnims();
                this.SetDefaultScripts();
                this.LoadScriptEngines();
            }
            catch (Exception e)
            {
                OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Constructor failed with exception " + e.ToString());
            }
        }
Exemple #3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SecondLife()
 {
     // These are order-dependant
     Network    = new NetworkManager(this);
     Settings   = new Settings(this);
     Parcels    = new ParcelManager(this);
     Self       = new AgentManager(this);
     Avatars    = new AvatarManager(this);
     Friends    = new FriendsManager(this);
     Grid       = new GridManager(this);
     Objects    = new ObjectManager(this);
     Groups     = new GroupManager(this);
     Assets     = new AssetManager(this);
     Appearance = new AppearanceManager(this, Assets);
     Inventory  = new InventoryManager(this);
     Directory  = new DirectoryManager(this);
     Terrain    = new TerrainManager(this);
     Sound      = new SoundManager(this);
     Throttle   = new AgentThrottle(this);
 }
Exemple #4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SecondLife()
 {
     // These are order-dependant
     Network = new NetworkManager(this);
     Settings = new Settings(this);
     Parcels = new ParcelManager(this);
     Self = new AgentManager(this);
     Avatars = new AvatarManager(this);
     Friends = new FriendsManager(this);
     Grid = new GridManager(this);
     Objects = new ObjectManager(this);
     Groups = new GroupManager(this);
     Assets = new AssetManager(this);
     Appearance = new AppearanceManager(this, Assets);
     Inventory = new InventoryManager(this);
     Directory = new DirectoryManager(this);
     Terrain = new TerrainManager(this);
     Sound = new SoundManager(this);
     Throttle = new AgentThrottle(this);
 }