aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/RegionCombinerModule
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs33
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs23
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs2
-rw-r--r--OpenSim/Region/RegionCombinerModule/Resources/RegionCombinerModule.addin.xml14
4 files changed, 58 insertions, 14 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..085eb59
--- /dev/null
+++ b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.RegionCombinerModule")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("http://opensimulator.org")]
12[assembly: AssemblyProduct("OpenSim")]
13[assembly: AssemblyCopyright("OpenSimulator developers")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("73c166d2-c9d8-4ab8-af4e-89c41b4b58a9")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32[assembly: AssemblyVersion("0.7.5.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 3144d76..905540d 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -39,11 +39,8 @@ using OpenSim.Framework.Console;
39using OpenSim.Region.Physics.Manager; 39using OpenSim.Region.Physics.Manager;
40using Mono.Addins; 40using Mono.Addins;
41 41
42[assembly: Addin("RegionCombinerModule", "0.1")]
43[assembly: AddinDependency("OpenSim", "0.5")]
44namespace OpenSim.Region.RegionCombinerModule 42namespace OpenSim.Region.RegionCombinerModule
45{ 43{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
47 public class RegionCombinerModule : ISharedRegionModule, IRegionCombinerModule 44 public class RegionCombinerModule : ISharedRegionModule, IRegionCombinerModule
48 { 45 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -722,21 +719,21 @@ namespace OpenSim.Region.RegionCombinerModule
722 rootConn.ClientEventForwarder = new RegionCombinerClientEventForwarder(rootConn); 719 rootConn.ClientEventForwarder = new RegionCombinerClientEventForwarder(rootConn);
723 720
724 // Sets up the CoarseLocationUpdate forwarder for this root region 721 // Sets up the CoarseLocationUpdate forwarder for this root region
725 scene.EventManager.OnNewPresence += SetCourseLocationDelegate; 722 scene.EventManager.OnNewPresence += SetCoarseLocationDelegate;
726 723
727 // Adds this root region to a dictionary of regions that are connectable 724 // Adds this root region to a dictionary of regions that are connectable
728 m_regions.Add(scene.RegionInfo.originRegionID, rootConn); 725 m_regions.Add(scene.RegionInfo.originRegionID, rootConn);
729 } 726 }
730 } 727 }
731 728
732 private void SetCourseLocationDelegate(ScenePresence presence) 729 private void SetCoarseLocationDelegate(ScenePresence presence)
733 { 730 {
734 presence.SetSendCourseLocationMethod(SendCourseLocationUpdates); 731 presence.SetSendCoarseLocationMethod(SendCoarseLocationUpdates);
735 } 732 }
736 733
737 // This delegate was refactored for non-combined regions. 734 // This delegate was refactored for non-combined regions.
738 // This combined region version will not use the pre-compiled lists of locations and ids 735 // This combined region version will not use the pre-compiled lists of locations and ids
739 private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs) 736 private void SendCoarseLocationUpdates(UUID sceneId, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
740 { 737 {
741 RegionConnections connectiondata = null; 738 RegionConnections connectiondata = null;
742 lock (m_regions) 739 lock (m_regions)
@@ -759,18 +756,18 @@ namespace OpenSim.Region.RegionCombinerModule
759 } 756 }
760 }); 757 });
761 758
762 DistributeCourseLocationUpdates(CoarseLocations, AvatarUUIDs, connectiondata, presence); 759 DistributeCoarseLocationUpdates(CoarseLocations, AvatarUUIDs, connectiondata, presence);
763 } 760 }
764 761
765 private void DistributeCourseLocationUpdates(List<Vector3> locations, List<UUID> uuids, 762 private void DistributeCoarseLocationUpdates(List<Vector3> locations, List<UUID> uuids,
766 RegionConnections connectiondata, ScenePresence rootPresence) 763 RegionConnections connectiondata, ScenePresence rootPresence)
767 { 764 {
768 RegionData[] rdata = connectiondata.ConnectedRegions.ToArray(); 765 RegionData[] rdata = connectiondata.ConnectedRegions.ToArray();
769 //List<IClientAPI> clients = new List<IClientAPI>(); 766 //List<IClientAPI> clients = new List<IClientAPI>();
770 Dictionary<Vector2, RegionCourseLocationStruct> updates = new Dictionary<Vector2, RegionCourseLocationStruct>(); 767 Dictionary<Vector2, RegionCoarseLocationStruct> updates = new Dictionary<Vector2, RegionCoarseLocationStruct>();
771 768
772 // Root Region entry 769 // Root Region entry
773 RegionCourseLocationStruct rootupdatedata = new RegionCourseLocationStruct(); 770 RegionCoarseLocationStruct rootupdatedata = new RegionCoarseLocationStruct();
774 rootupdatedata.Locations = new List<Vector3>(); 771 rootupdatedata.Locations = new List<Vector3>();
775 rootupdatedata.Uuids = new List<UUID>(); 772 rootupdatedata.Uuids = new List<UUID>();
776 rootupdatedata.Offset = Vector2.Zero; 773 rootupdatedata.Offset = Vector2.Zero;
@@ -784,7 +781,7 @@ namespace OpenSim.Region.RegionCombinerModule
784 foreach (RegionData regiondata in rdata) 781 foreach (RegionData regiondata in rdata)
785 { 782 {
786 Vector2 offset = new Vector2(regiondata.Offset.X, regiondata.Offset.Y); 783 Vector2 offset = new Vector2(regiondata.Offset.X, regiondata.Offset.Y);
787 RegionCourseLocationStruct updatedata = new RegionCourseLocationStruct(); 784 RegionCoarseLocationStruct updatedata = new RegionCoarseLocationStruct();
788 updatedata.Locations = new List<Vector3>(); 785 updatedata.Locations = new List<Vector3>();
789 updatedata.Uuids = new List<UUID>(); 786 updatedata.Uuids = new List<UUID>();
790 updatedata.Offset = offset; 787 updatedata.Offset = offset;
@@ -810,7 +807,7 @@ namespace OpenSim.Region.RegionCombinerModule
810 if (!updates.ContainsKey(offset)) 807 if (!updates.ContainsKey(offset))
811 { 808 {
812 // This shouldn't happen 809 // This shouldn't happen
813 RegionCourseLocationStruct updatedata = new RegionCourseLocationStruct(); 810 RegionCoarseLocationStruct updatedata = new RegionCoarseLocationStruct();
814 updatedata.Locations = new List<Vector3>(); 811 updatedata.Locations = new List<Vector3>();
815 updatedata.Uuids = new List<UUID>(); 812 updatedata.Uuids = new List<UUID>();
816 updatedata.Offset = offset; 813 updatedata.Offset = offset;
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs b/OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs
index 53a678f..224ac99 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs
@@ -33,7 +33,7 @@ using OpenSim.Framework;
33namespace OpenSim.Region.RegionCombinerModule 33namespace OpenSim.Region.RegionCombinerModule
34{ 34{
35 35
36 struct RegionCourseLocationStruct 36 struct RegionCoarseLocationStruct
37 { 37 {
38 public List<Vector3> Locations; 38 public List<Vector3> Locations;
39 public List<UUID> Uuids; 39 public List<UUID> Uuids;
diff --git a/OpenSim/Region/RegionCombinerModule/Resources/RegionCombinerModule.addin.xml b/OpenSim/Region/RegionCombinerModule/Resources/RegionCombinerModule.addin.xml
new file mode 100644
index 0000000..13cb8b6
--- /dev/null
+++ b/OpenSim/Region/RegionCombinerModule/Resources/RegionCombinerModule.addin.xml
@@ -0,0 +1,14 @@
1<Addin id="OpenSim.RegionModules.RegionCombinerModule" version="0.3">
2 <Runtime>
3 <Import assembly="OpenSim.Region.RegionCombinerModule.dll"/>
4 </Runtime>
5
6 <Dependencies>
7 <Addin id="OpenSim" version="0.5" />
8 </Dependencies>
9
10 <Extension path = "/OpenSim/RegionModules">
11 <RegionModule id="RegionCombinerModule" type="OpenSim.Region.RegionCombinerModule.RegionCombinerModule" />
12 </Extension>
13
14</Addin>