From 60a83574f41f964dc2058c80c987045db97421f7 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 5 May 2008 18:53:07 +0000 Subject: * Just some tidy up and documentation before I make my first ever attempt to extract a lump of code out to a region module --- OpenSim/Region/Environment/Scenes/Scene.cs | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 33a9102..f861361 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -101,9 +101,9 @@ namespace OpenSim.Region.Environment.Scenes protected BaseHttpServer m_httpListener; protected Dictionary Modules = new Dictionary(); - public Dictionary ModuleInterfaces = new Dictionary(); + protected Dictionary ModuleInterfaces = new Dictionary(); protected Dictionary ModuleAPIMethods = new Dictionary(); - public Dictionary m_moduleCommanders = new Dictionary(); + protected Dictionary m_moduleCommanders = new Dictionary(); //API module interfaces @@ -142,8 +142,6 @@ namespace OpenSim.Region.Environment.Scenes private bool m_physics_enabled = true; private bool m_scripts_enabled = true; - - #endregion #region Properties @@ -1618,16 +1616,13 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 homePostion = new LLVector3(UserProfile.HomeLocationX,UserProfile.HomeLocationY,UserProfile.HomeLocationZ); LLVector3 homeLookat = new LLVector3(UserProfile.HomeLookAt); RequestTeleportLocation(client, homeRegion, homePostion,homeLookat,(uint)0); - } - - } + public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) - { - + { LLVector3 pos; const bool frontFacesOnly = true; @@ -1639,9 +1634,7 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); - Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); - - + Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); if (target2.ParentGroup != null) { @@ -1739,8 +1732,8 @@ namespace OpenSim.Region.Environment.Scenes { remoteClient.SendAgentAlertMessage("Set Home request Failed",false); } - } + protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) { AvatarAppearance appearance; @@ -1756,7 +1749,6 @@ namespace OpenSim.Region.Environment.Scenes return avatar; } - protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) { if (m_AvatarFactory == null || @@ -2294,7 +2286,9 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// Register an interface to a region module. This allows module methods to be called directly as + /// well as via events. If there is already a module registered for this interface, it is not replaced + /// (is this the best behaviour?) /// /// public void RegisterModuleInterface(M mod) @@ -2306,9 +2300,9 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// For the given interface, retrieve the region module which implements it. /// - /// + /// null if there is no module implementing that interface public T RequestModuleInterface() { if (ModuleInterfaces.ContainsKey(typeof(T))) -- cgit v1.1