aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
index 70018fd..aa6f59a 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Communications.OGS1
41 41
42 public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); 42 public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData);
43 43
44 public delegate bool RegionUP (RegionInfo region);
45
44 public sealed class InterRegionSingleton 46 public sealed class InterRegionSingleton
45 { 47 {
46 private static readonly InterRegionSingleton instance = new InterRegionSingleton(); 48 private static readonly InterRegionSingleton instance = new InterRegionSingleton();
@@ -49,6 +51,8 @@ namespace OpenSim.Region.Communications.OGS1
49 public event ExpectArrival OnArrival; 51 public event ExpectArrival OnArrival;
50 public event InformRegionPrimGroup OnPrimGroupNear; 52 public event InformRegionPrimGroup OnPrimGroupNear;
51 public event PrimGroupArrival OnPrimGroupArrival; 53 public event PrimGroupArrival OnPrimGroupArrival;
54 public event RegionUp OnRegionUp;
55
52 56
53 static InterRegionSingleton() 57 static InterRegionSingleton()
54 { 58 {
@@ -72,6 +76,15 @@ namespace OpenSim.Region.Communications.OGS1
72 return false; 76 return false;
73 } 77 }
74 78
79 public bool RegionUp(RegionInfo region)
80 {
81 if (OnRegionUp != null)
82 {
83 return OnRegionUp(region);
84 }
85 return false;
86 }
87
75 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 88 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
76 { 89 {
77 if (OnArrival != null) 90 if (OnArrival != null)
@@ -116,7 +129,18 @@ namespace OpenSim.Region.Communications.OGS1
116 return false; 129 return false;
117 } 130 }
118 } 131 }
119 132 public bool RegionUp(RegionInfo region)
133 {
134 try
135 {
136 return InterRegionSingleton.Instance.RegionUp(region);
137 }
138 catch (RemotingException e)
139 {
140 Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
141 return false;
142 }
143 }
120 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 144 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
121 { 145 {
122 try 146 try