Inheritance: SceneBase
Esempio n. 1
1
        private void CreatePointEntity(Scene scene, UUID uuid, Vector3 groupPos)
        {
            SceneObjectPart y = new SceneObjectPart();

            //Initialize part
            y.Name = "Very Small Point";
            y.RegionHandle = scene.RegionInfo.RegionHandle;
            y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
            y.OwnerID = UUID.Zero;
            y.CreatorID = UUID.Zero;
            y.LastOwnerID = UUID.Zero;
            y.UUID = uuid;

            y.Shape = PrimitiveBaseShape.CreateBox();
            y.Scale = new Vector3(0.01f,0.01f,0.01f);
            y.LastOwnerID = UUID.Zero;
            y.GroupPosition = groupPos;
            y.OffsetPosition = new Vector3(0, 0, 0);
            y.RotationOffset = new Quaternion(0,0,0,0);
            y.Velocity = new Vector3(0, 0, 0);
            y.RotationalVelocity = new Vector3(0, 0, 0);
            y.AngularVelocity = new Vector3(0, 0, 0);
            y.Acceleration = new Vector3(0, 0, 0);

            y.Flags = 0;
            y.TrimPermissions();

            //Initialize group and add part as root part
            SceneObjectGroup x = new SceneObjectGroup(y);
            x.SetScene(scene);
            x.RegionHandle = scene.RegionInfo.RegionHandle;
            x.SetScene(scene);

            m_Entity = x;
        }
Esempio n. 2
1
 public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene)
 {
     m_firstname = firstname;
     m_lastname = lastname;
     m_startPos = position;
     m_scene = scene;
 }
Esempio n. 3
1
        public void Init()
        {
            TestHelper.InMethod();
            
            scene = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
            scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
            scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000);

            ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
            interregionComms.Initialise(new IniConfigSource());
            interregionComms.PostInitialise();
            SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms);
            SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms);
            SceneSetupHelpers.SetupSceneModules(scene3, new IniConfigSource(), interregionComms);

            agent1 = UUID.Random();
            agent2 = UUID.Random();
            agent3 = UUID.Random();
            random = new Random();
            sog1 = NewSOG(UUID.Random(), scene, agent1);
            sog2 = NewSOG(UUID.Random(), scene, agent1);
            sog3 = NewSOG(UUID.Random(), scene, agent1);

            //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
            region1 = scene.RegionInfo.RegionHandle;
            region2 = scene2.RegionInfo.RegionHandle;
            region3 = scene3.RegionInfo.RegionHandle;
        }
Esempio n. 4
0
        public void AddRegion(Scene scene)
        {
            if (!m_SceneList.Contains(scene))
                m_SceneList.Add(scene);
            MainConsole.Instance.Commands.AddCommand("access", true,
                    "login enable",
                    "login enable",
                    "Enable simulator logins",
                    String.Empty,
                    HandleLoginCommand);

            MainConsole.Instance.Commands.AddCommand("access", true,
                    "login disable",
                    "login disable",
                    "Disable simulator logins",
                    String.Empty,
                    HandleLoginCommand);

            MainConsole.Instance.Commands.AddCommand("access", true,
                    "login status",
                    "login status",
                    "Show login status",
                    String.Empty,
                    HandleLoginCommand);
        }
        public void RemoveRegion(Scene scene)
        {
            if (!m_Enabled)
                return;

            m_PresenceDetector.RemoveRegion(scene);
        }
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
                return;

            scene.RegisterModuleInterface<IUserAccountService>(this);
        }
Esempio n. 7
0
 public DearchiveContext(Scene scene)
 {
     Scene = scene;
     SerialisedSceneObjects = new List<string>();
     SerialisedParcels = new List<string>();
     SceneObjects = new List<SceneObjectGroup>();
 }
		public void Initialise(Scene scene, IConfigSource config)
		{
			if (!m_enabled) return;					 

			IConfig cnf = config.Configs["Messaging"];

			if (m_SceneList.Count==0) 
			{
				if (cnf == null)
				{
					m_enabled = false;
					return;
				}

				if (cnf != null && cnf.GetString("MuteListModule", "None") != "NSLMuteListModule")
				{
					m_enabled = false;
					return;
				}

				m_RestURL = cnf.GetString("MuteListURL", "");
				if (m_RestURL == "")
				{
					m_log.Error("[NSL MUTE LIST] Module was enabled, but no URL is given, disabling");
					m_enabled = false;
					return;
				}
			}

			if (!m_SceneList.Contains(scene)) m_SceneList.Add(scene);
			m_config = config;
   
			scene.EventManager.OnNewClient += OnNewClient;
		}
Esempio n. 9
0
 public void RemoveRegion(Scene scene)
 {
     scene.EventManager.OnNewClient -= EventManager_OnNewClient;
     scene.EventManager.OnClosingClient -= EventManager_OnClosingClient;
     scene.EventManager.OnNewPresence -= EventManager_OnNewPresence;
     scene.EventManager.OnRemovePresence -= EventManager_OnRemovePresence;
 }
Esempio n. 10
0
        public void AddRegion(Scene scene)
        {
            // m_log.InfoFormat("[XBakes]: Enabled for region {0}", scene.RegionInfo.RegionName);
            m_Scene = scene;

            scene.RegisterModuleInterface<IBakedTextureModule>(this);
        }
Esempio n. 11
0
        public void AddRegion(Scene scene)
        {
            if (m_scene == null)
                m_scene = scene;

            scene.RegisterModuleInterface<IJ2KDecoder>(this);
        }
Esempio n. 12
0
        public void RemoveRegion(Scene scene) 
        {
            m_scene.UnregisterModuleInterface<IAttachmentsModule>(this);

            if (Enabled)
                m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
        }
Esempio n. 13
0
 public void AddRegion(Scene scene)
 {
     m_scene = scene;
     m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
     m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
     // TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI
 }
Esempio n. 14
0
        public void Initialise(Scene scene, IConfigSource config)
        {
            m_scene = scene;
            m_scene.RegisterModuleInterface<IRegionModule>(this);
            m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
            
            // ini file settings
            try
            {
                m_enableWindlight = config.Configs["LightShare"].GetBoolean("enable_windlight", false);
            }
            catch (Exception)
            {
                m_log.Debug("[WINDLIGHT]: ini failure for enable_windlight - using default");
            }

            if (m_enableWindlight)
            {
                m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent;
                m_scene.EventManager.OnSaveNewWindlightProfile += EventManager_OnSaveNewWindlightProfile;
                m_scene.EventManager.OnSendNewWindlightProfileTargeted += EventManager_OnSendNewWindlightProfileTargeted;
            }

            InstallCommands();

            m_log.Debug("[WINDLIGHT]: Initialised windlight module");
        }
        public void RemoveRegion(Scene scene)
        {
            if (!m_Enabled)
                return;

            m_Scenes.Remove(scene);
        }
Esempio n. 16
0
 public void AddRegion(Scene scene)
 {
     if (!m_Enabled)
         return;
     scene.RegisterModuleInterface<IWComms>(this);
     m_scenes.Add(scene);
 }
        public virtual void Initialize(Scene scene, IConfigSource config)
        {
            if (!initialized)
            {
                initialized = true;

                IConfig netConfig = config.Configs["Network"];

                if (netConfig != null)
                {
                    _gridSendKey = netConfig.GetString("grid_send_key");
                }


                IConfig startupConfig = config.Configs["Communications"];
                if ((startupConfig == null)
                    || (startupConfig != null)
                    && (startupConfig.GetString("InterregionComms", "RESTComms") == "RESTComms"))
                {
                    m_log.Info("[REST COMMS]: Enabling InterregionComms RESTComms module");
                    m_enabled = true;

                    InitOnce(scene);
                }
            }

            if (!m_enabled)
                return;

            InitEach(scene);

        }
Esempio n. 18
0
        public void AddRegion(Scene scene)
        {
            if (!m_enabled)
                return;

            m_scene = scene;

            m_scene.RegisterModuleInterface<IRegionReadyModule>(this);

            m_firstEmptyCompileQueue = true;
            m_oarFileLoading = false;
            m_lastOarLoadedOk = true;

            m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;

            m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);

            if (m_disable_logins)
            {
                m_scene.LoginLock = true;
                m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;

                m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);

                if (m_uri != string.Empty)
                {
                    RRAlert("disabled");
                }
            }
        }
Esempio n. 19
0
 public virtual void RemoveRegion(Scene scene)
 {
     if ((m_Scenes != null) && m_Scenes.Contains(scene))
     {
         m_Scenes.Remove(scene);
     }
 }
Esempio n. 20
0
 public void AddRegion(Scene scene)
 {
     m_scene = scene;
     m_scene.RegisterModuleInterface<IBuySellModule>(this);
     m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
     m_scene.EventManager.OnClosingClient += UnsubscribeFromClientEvents;
 }
Esempio n. 21
0
 public void AddRegion(Scene scene)
 {
     m_scene = scene;
     scene.EventManager.OnNewClient += OnNewClient;
     scene.EventManager.OnClientClosed += OnClientClosed;
     m_scene.RegisterModuleInterface<IDynamicFloaterModule>(this);
 }
        public void AddRegion(Scene scene)
        {
            m_scene = scene;
            scene.RegisterModuleInterface<IEventQueue>(this);

            scene.EventManager.OnClientClosed += ClientClosed;
            scene.EventManager.OnRegisterCaps += OnRegisterCaps;

            MainConsole.Instance.Commands.AddCommand(
                "Debug",
                false,
                "debug eq",
                "debug eq [0|1|2]",
                "Turn on event queue debugging\n"
                    + "  <= 0 - turns off all event queue logging\n"
                    + "  >= 1 - turns on outgoing event logging\n"
                    + "  >= 2 - turns on poll notification",
                HandleDebugEq);

            MainConsole.Instance.Commands.AddCommand(
                "Debug",
                false,
                "show eq",
                "show eq",
                "Show contents of event queues for logged in avatars.  Used for debugging.",
                HandleShowEq);
        }
Esempio n. 23
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_RegionLoaded)
                return;

            m_GridService = scene.GridService;

            //Set up the public connection
            MainServer.Instance.AddStreamHandler(new IWCIncomingPublicConnections(this));

            //Startup outgoing
            OutgoingPrivateComms = new IWCOutgoingPrivateConnections(this);
            OutgoingPublicComms = new IWCOutgoingPublicConnections(this);

            //Make our connection strings.
            Connections = BuildConnections();

            ContactOtherServers();

            //Don't do this again
            m_RegionLoaded = true;
        }
        public virtual void Initialise(Scene scene, IConfigSource config)
        {
            m_gConfig = config;

            IConfig startupConfig = m_gConfig.Configs["Startup"];

            ReadConfigAndPopulate(scene, startupConfig, "Startup");

            if (enabledYN)
            {
                m_scene = scene;
                scene.RegisterModuleInterface<IEventQueue>(this);
                
                // Register fallback handler
                // Why does EQG Fail on region crossings!
                
                //scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack);

                scene.EventManager.OnNewClient += OnNewClient;

                // TODO: Leaving these open, or closing them when we
                // become a child is incorrect. It messes up TP in a big
                // way. CAPS/EQ need to be active as long as the UDP
                // circuit is there.

                scene.EventManager.OnClientClosed += ClientClosed;
                scene.EventManager.OnMakeChildAgent += MakeChildAgent;
                scene.EventManager.OnRegisterCaps += OnRegisterCaps;
            }
            else
            {
                m_gConfig = null;
            }
        
        }
Esempio n. 25
0
        /// <summary>
        /// Exports a specified scene to the SVN repo directory, then commits.
        /// </summary>
        /// <param name="scene">The scene to export</param>
        public void SaveRegion(Scene scene)
        {
            List<string> svnfilenames = CreateAndAddExport(scene);

            m_svnClient.Commit3(svnfilenames, true, false);
            m_log.Info("[SVNBACKUP]: Region backup successful (" + scene.RegionInfo.RegionName + ").");
        }
Esempio n. 26
0
        public void AddRegion(Scene scene)
        {
            m_scene = scene;

            m_scene.EventManager.OnNewClient += OnNewClient;
            m_scene.EventManager.OnClosingClient += OnClosingClient;
        }
Esempio n. 27
0
        // Setup runtime variable values

        public RegionState(Scene p_scene, IConfig p_config)
        {

            scene  = p_scene;
            config = p_config;

            Region = scene.RegionInfo.RegionName;
            Host   = scene.RegionInfo.ExternalHostName;
            LocX   = Convert.ToString(scene.RegionInfo.RegionLocX / Constants.RegionSize);
            LocY   = Convert.ToString(scene.RegionInfo.RegionLocY / Constants.RegionSize);
            IDK    = Convert.ToString(_idk_++);

            // OpenChannel conditionally establishes a connection to the
            // IRC server. The request will either succeed, or it will
            // throw an exception.

            ChannelState.OpenChannel(this, config);

            // Connect channel to world events

            scene.EventManager.OnChatFromWorld  += OnSimChat;
            scene.EventManager.OnChatFromClient += OnSimChat;
            scene.EventManager.OnMakeRootAgent  += OnMakeRootAgent;
            scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;

            m_log.InfoFormat("[IRC-Region {0}] Initialization complete", Region);

        }
Esempio n. 28
0
 public void RemoveRegion(Scene scene) 
 {
     if (ENABLED)
     {
         m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
     }
 }
Esempio n. 29
0
        public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom)
        {
            // Block.
            m_createMutex.WaitOne();

            // Copy Temp Variables for Timer to pick up.
            lock (p_lock)
            {
                p_firstname = firstname;
                p_lastname = lastname;
                p_position = position;
                p_scene = scene;
                p_cloneAppearanceFrom = cloneAppearanceFrom;
                p_inUse = true;
                p_returnUuid = UUID.Zero;
            }

            while (p_returnUuid == UUID.Zero)
            {
                Thread.Sleep(250);
            }

            m_createMutex.ReleaseMutex();

            return p_returnUuid;
        }
Esempio n. 30
0
        private bool m_enabled = false; // Module is only enabled if running in grid mode

        #region IRegionModule Members

        public void Initialize(Scene scene, IConfigSource source)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                IConfig startupConfig = source.Configs["Startup"];
                if (startupConfig != null)
                {
                    m_enabled = startupConfig.GetBoolean("gridmode", false);
                }

                IConfig netConfig = source.Configs["Network"];

                if (netConfig != null)
                {
                    _gridSendKey = netConfig.GetString("grid_send_key");
                }
                else
                {
                    throw new Exception("LLProxyLoginModule: Network configuration not found");
                }

                if (m_enabled)
                {
                    AddHttpHandlers();
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }
Esempio n. 31
0
        public void AddRegion(OpenSim.Region.Framework.Scenes.Scene scene)
        {
            m_log.Error("[SCENEIMPORT]: Add Region: ");
            m_scenes.Add(scene);
            m_scene = scene;

            //           scene.EventManager.OnClientConnect += new EventManager.OnClientConnectCoreDelegate(HandleOnClientConnect);
        }
Esempio n. 32
0
 public void RegionLoaded(OpenSim.Region.Framework.Scenes.Scene scene)
 {
     if (!m_initialised)
     {
         MainServer.Instance.AddXmlRPCHandler("ogrescene_upload", XmlRpcHandler);
         MainServer.Instance.AddXmlRPCHandler("ogrescene_list", ListXmlRpcHandler);
         MainServer.Instance.AddXmlRPCHandler("ogrescene_getasset", GetAssetXmlRpcHandler);
         MainServer.Instance.AddXmlRPCHandler("ogrescene_clear", ClearXmlRpcHandler);
         m_initialised = true;
     }
 }
Esempio n. 33
0
        public void Initialize()
        {
            IConfigSource openSimINI    = new IniConfigSource();
            IConfig       startupConfig = openSimINI.AddConfig("Startup");

            startupConfig.Set("physics", "OpenDynamicsEngine");
            startupConfig.Set("DecodedSculptMapPath", "j2kDecodeCache");

            Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);

            //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene(
            //                "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent);
            RegionInfo info = new RegionInfo();

            info.RegionName  = "ODETestRegion";
            info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
            OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info);

            //IMesher mesher = new OpenSim.Region.PhysicsModules.Meshing.Meshmerizer();
            //INonSharedRegionModule mod = mesher as INonSharedRegionModule;
            //mod.Initialise(openSimINI);
            //mod.AddRegion(scene);
            //mod.RegionLoaded(scene);

            pScene = new OdeScene();
            Console.WriteLine("HERE " + (pScene == null ? "Null" : "Not null"));
            INonSharedRegionModule mod = (pScene as INonSharedRegionModule);

            Console.WriteLine("HERE " + (mod == null ? "Null" : "Not null"));
            mod.Initialise(openSimINI);
            mod.AddRegion(scene);
            mod.RegionLoaded(scene);

            // Loading ODEPlugin
            //cbt = new OdePlugin();
            // Getting Physics Scene
            //ps = cbt.GetScene("test");
            // Initializing Physics Scene.
            //ps.Initialise(imp.GetMesher(TopConfig), null, Vector3.Zero);
            float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize];
            for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++)
            {
                _heightmap[i] = 21f;
            }
            pScene.SetTerrain(_heightmap);
        }
 public ScenePermissions(Scene scene)
 {
     m_scene = scene;
 }
Esempio n. 35
0
        public void RemoveRegion(OpenSim.Region.Framework.Scenes.Scene scene)
        {
            m_scenes.Remove(scene);

            //           scene.EventManager.OnClientConnect -= new EventManager.OnClientConnectCoreDelegate(HandleOnClientConnect);
        }