diff options
Diffstat (limited to 'OpenSim/Region')
4 files changed, 69 insertions, 37 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 8bdbe89..8220ae8 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -214,6 +214,7 @@ namespace OpenSim.Region.ClientStack | |||
214 | private UpdateVector handler089 = null; //OnUpdatePrimGroupPosition; | 214 | private UpdateVector handler089 = null; //OnUpdatePrimGroupPosition; |
215 | private UpdatePrimRotation handler090 = null; //OnUpdatePrimGroupRotation; | 215 | private UpdatePrimRotation handler090 = null; //OnUpdatePrimGroupRotation; |
216 | private UpdatePrimGroupRotation handler091 = null; //OnUpdatePrimGroupMouseRotation; | 216 | private UpdatePrimGroupRotation handler091 = null; //OnUpdatePrimGroupMouseRotation; |
217 | private PacketStats handler093 = null; // OnPacketStats; | ||
217 | 218 | ||
218 | 219 | ||
219 | /* Properties */ | 220 | /* Properties */ |
@@ -2818,9 +2819,10 @@ namespace OpenSim.Region.ClientStack | |||
2818 | 2819 | ||
2819 | protected void SendPacketStats() | 2820 | protected void SendPacketStats() |
2820 | { | 2821 | { |
2821 | if (OnPacketStats != null) | 2822 | handler093 = OnPacketStats; |
2823 | if (handler093 != null) | ||
2822 | { | 2824 | { |
2823 | OnPacketStats(m_packetsReceived - m_lastPacketsReceivedSentToScene, m_packetsSent - m_lastPacketsSentSentToScene, m_unAckedBytes); | 2825 | handler093(m_packetsReceived - m_lastPacketsReceivedSentToScene, m_packetsSent - m_lastPacketsSentSentToScene, m_unAckedBytes); |
2824 | m_lastPacketsReceivedSentToScene = m_packetsReceived; | 2826 | m_lastPacketsReceivedSentToScene = m_packetsReceived; |
2825 | m_lastPacketsSentSentToScene = m_packetsSent; | 2827 | m_lastPacketsSentSentToScene = m_packetsSent; |
2826 | } | 2828 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index b480a1a..0e9b3d0 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -55,6 +55,8 @@ namespace OpenSim.Region.Communications.Local | |||
55 | 55 | ||
56 | public event LoginToRegionEvent OnLoginToRegion; | 56 | public event LoginToRegionEvent OnLoginToRegion; |
57 | 57 | ||
58 | private LoginToRegionEvent handler001 = null; // OnLoginToRegion; | ||
59 | |||
58 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, | 60 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, |
59 | CommunicationsLocal parent, NetworkServersInfo serversInfo, | 61 | CommunicationsLocal parent, NetworkServersInfo serversInfo, |
60 | bool authenticate) | 62 | bool authenticate) |
@@ -161,9 +163,10 @@ namespace OpenSim.Region.Communications.Local | |||
161 | _login.StartPos = new LLVector3(128, 128, 70); | 163 | _login.StartPos = new LLVector3(128, 128, 70); |
162 | _login.CapsPath = capsPath; | 164 | _login.CapsPath = capsPath; |
163 | 165 | ||
164 | if (OnLoginToRegion != null) | 166 | handler001 = OnLoginToRegion; |
167 | if (handler001 != null) | ||
165 | { | 168 | { |
166 | OnLoginToRegion(currentRegion, _login); | 169 | handler001(currentRegion, _login); |
167 | } | 170 | } |
168 | } | 171 | } |
169 | else | 172 | else |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 3cde55c..d21852d 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -59,6 +59,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
59 | public event ChildAgentUpdate OnChildAgentUpdate; | 59 | public event ChildAgentUpdate OnChildAgentUpdate; |
60 | public event TellRegionToCloseChildConnection OnTellRegionToCloseChildConnection; | 60 | public event TellRegionToCloseChildConnection OnTellRegionToCloseChildConnection; |
61 | 61 | ||
62 | private InformRegionChild handler001 = null; // OnChildAgent; | ||
63 | private ExpectArrival handler002 = null; // OnArrival; | ||
64 | private InformRegionPrimGroup handler003 = null; // OnPrimGroupNear; | ||
65 | private PrimGroupArrival handler004 = null; // OnPrimGroupArrival; | ||
66 | private RegionUp handler005 = null; // OnRegionUp; | ||
67 | private ChildAgentUpdate handler006 = null; // OnChildAgentUpdate; | ||
68 | private TellRegionToCloseChildConnection handler007 = null; // OnTellRegionToCloseChildConnection; | ||
62 | 69 | ||
63 | 70 | ||
64 | static InterRegionSingleton() | 71 | static InterRegionSingleton() |
@@ -76,64 +83,70 @@ namespace OpenSim.Region.Communications.OGS1 | |||
76 | 83 | ||
77 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) | 84 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) |
78 | { | 85 | { |
79 | if (OnChildAgent != null) | 86 | handler001 = OnChildAgent; |
87 | if (handler001 != null) | ||
80 | { | 88 | { |
81 | return OnChildAgent(regionHandle, agentData); | 89 | return handler001(regionHandle, agentData); |
82 | } | 90 | } |
83 | return false; | 91 | return false; |
84 | } | 92 | } |
85 | 93 | ||
86 | public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle) | 94 | public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle) |
87 | { | 95 | { |
88 | if (OnRegionUp != null) | 96 | handler005 = OnRegionUp; |
97 | if (handler005 != null) | ||
89 | { | 98 | { |
90 | return OnRegionUp(sregion, regionhandle); | 99 | return handler005(sregion, regionhandle); |
91 | } | 100 | } |
92 | return false; | 101 | return false; |
93 | } | 102 | } |
94 | 103 | ||
95 | public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentUpdate) | 104 | public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentUpdate) |
96 | { | 105 | { |
97 | if (OnChildAgentUpdate != null) | 106 | handler006 = OnChildAgentUpdate; |
107 | if (handler006 != null) | ||
98 | { | 108 | { |
99 | return OnChildAgentUpdate(regionHandle, cAgentUpdate); | 109 | return handler006(regionHandle, cAgentUpdate); |
100 | } | 110 | } |
101 | return false; | 111 | return false; |
102 | } | 112 | } |
103 | 113 | ||
104 | public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) | 114 | public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) |
105 | { | 115 | { |
106 | if (OnArrival != null) | 116 | handler002 = OnArrival; |
117 | if (handler002 != null) | ||
107 | { | 118 | { |
108 | return OnArrival(regionHandle, agentID, position, isFlying); | 119 | return handler002(regionHandle, agentID, position, isFlying); |
109 | } | 120 | } |
110 | return false; | 121 | return false; |
111 | } | 122 | } |
112 | 123 | ||
113 | public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | 124 | public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) |
114 | { | 125 | { |
115 | if (OnPrimGroupNear != null) | 126 | handler003 = OnPrimGroupNear; |
127 | if (handler003 != null) | ||
116 | { | 128 | { |
117 | return OnPrimGroupNear(regionHandle, primID, position, isPhysical); | 129 | return handler003(regionHandle, primID, position, isPhysical); |
118 | } | 130 | } |
119 | return false; | 131 | return false; |
120 | } | 132 | } |
121 | 133 | ||
122 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | 134 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData) |
123 | { | 135 | { |
124 | if (OnPrimGroupArrival != null) | 136 | handler004 = OnPrimGroupArrival; |
137 | if (handler004 != null) | ||
125 | { | 138 | { |
126 | return OnPrimGroupArrival(regionHandle, primID, objData); | 139 | return handler004(regionHandle, primID, objData); |
127 | } | 140 | } |
128 | return false; | 141 | return false; |
129 | } | 142 | } |
130 | 143 | ||
131 | public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) | 144 | public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) |
132 | { | 145 | { |
133 | if (OnTellRegionToCloseChildConnection != null) | 146 | handler007 = OnTellRegionToCloseChildConnection; |
147 | if (handler007 != null) | ||
134 | { | 148 | { |
135 | 149 | return handler007(regionHandle, agentID); | |
136 | return OnTellRegionToCloseChildConnection(regionHandle, agentID); | ||
137 | } | 150 | } |
138 | return false; | 151 | return false; |
139 | } | 152 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index e51438d..8678f7a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -57,8 +57,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
57 | public event RegionUp OnRegionUp; | 57 | public event RegionUp OnRegionUp; |
58 | public event ChildAgentUpdate OnChildAgentUpdate; | 58 | public event ChildAgentUpdate OnChildAgentUpdate; |
59 | public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; | 59 | public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; |
60 | |||
61 | 60 | ||
61 | private AgentCrossing handler001 = null; // OnAvatarCrossingIntoRegion; | ||
62 | private ExpectUserDelegate handler002 = null; // OnExpectUser; | ||
63 | private ExpectPrimDelegate handler003 = null; // OnExpectPrim; | ||
64 | private CloseAgentConnection handler004 = null; // OnCloseAgentConnection; | ||
65 | private PrimCrossing handler005 = null; // OnPrimCrossingIntoRegion; | ||
66 | private RegionUp handler006 = null; // OnRegionUp; | ||
67 | private ChildAgentUpdate handler007 = null; // OnChildAgentUpdate; | ||
68 | private RemoveKnownRegionsFromAvatarList handler008 = null; // OnRemoveKnownRegionFromAvatar; | ||
62 | 69 | ||
63 | public KillObjectDelegate KillObject; | 70 | public KillObjectDelegate KillObject; |
64 | public string _debugRegionName = String.Empty; | 71 | public string _debugRegionName = String.Empty; |
@@ -125,27 +132,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | /// | 132 | /// |
126 | protected void NewUserConnection(ulong regionHandle, AgentCircuitData agent) | 133 | protected void NewUserConnection(ulong regionHandle, AgentCircuitData agent) |
127 | { | 134 | { |
128 | if (OnExpectUser != null) | 135 | handler002 = OnExpectUser; |
136 | if (handler002 != null) | ||
129 | { | 137 | { |
130 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); | 138 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); |
131 | OnExpectUser(regionHandle, agent); | 139 | handler002(regionHandle, agent); |
132 | } | 140 | } |
133 | } | 141 | } |
134 | 142 | ||
135 | protected bool newRegionUp(RegionInfo region) | 143 | protected bool newRegionUp(RegionInfo region) |
136 | { | 144 | { |
137 | if (OnRegionUp != null) | 145 | handler006 = OnRegionUp; |
146 | if (handler006 != null) | ||
138 | { | 147 | { |
139 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); | 148 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); |
140 | OnRegionUp(region); | 149 | handler006(region); |
141 | } | 150 | } |
142 | return true; | 151 | return true; |
143 | } | 152 | } |
144 | 153 | ||
145 | protected bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | 154 | protected bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) |
146 | { | 155 | { |
147 | if (OnChildAgentUpdate != null) | 156 | handler007 = OnChildAgentUpdate; |
148 | OnChildAgentUpdate(regionHandle, cAgentData); | 157 | if (handler007 != null) |
158 | handler007(regionHandle, cAgentData); | ||
149 | 159 | ||
150 | 160 | ||
151 | return true; | 161 | return true; |
@@ -153,36 +163,39 @@ namespace OpenSim.Region.Environment.Scenes | |||
153 | 163 | ||
154 | protected void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) | 164 | protected void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) |
155 | { | 165 | { |
156 | if (OnAvatarCrossingIntoRegion != null) | 166 | handler001 = OnAvatarCrossingIntoRegion; |
167 | if (handler001 != null) | ||
157 | { | 168 | { |
158 | OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying); | 169 | handler001(regionHandle, agentID, position, isFlying); |
159 | } | 170 | } |
160 | } | 171 | } |
161 | 172 | ||
162 | protected void IncomingPrimCrossing(ulong regionHandle, LLUUID primID, String objXMLData) | 173 | protected void IncomingPrimCrossing(ulong regionHandle, LLUUID primID, String objXMLData) |
163 | { | 174 | { |
164 | if (OnExpectPrim != null) | 175 | handler003 = OnExpectPrim; |
176 | if (handler003 != null) | ||
165 | { | 177 | { |
166 | OnExpectPrim(regionHandle, primID, objXMLData); | 178 | handler003(regionHandle, primID, objXMLData); |
167 | } | 179 | } |
168 | 180 | ||
169 | } | 181 | } |
170 | 182 | ||
171 | protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | 183 | protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) |
172 | { | 184 | { |
173 | if (OnPrimCrossingIntoRegion != null) | 185 | handler005 = OnPrimCrossingIntoRegion; |
186 | if (handler005 != null) | ||
174 | { | 187 | { |
175 | OnPrimCrossingIntoRegion(regionHandle, primID, position, isPhysical); | 188 | handler005(regionHandle, primID, position, isPhysical); |
176 | } | 189 | } |
177 | } | 190 | } |
178 | 191 | ||
179 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) | 192 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) |
180 | { | 193 | { |
181 | m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); | 194 | m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); |
182 | 195 | handler004 = OnCloseAgentConnection; | |
183 | if (OnCloseAgentConnection != null) | 196 | if (handler004 != null) |
184 | { | 197 | { |
185 | return OnCloseAgentConnection(regionHandle, agentID); | 198 | return handler004(regionHandle, agentID); |
186 | } | 199 | } |
187 | return false; | 200 | return false; |
188 | } | 201 | } |
@@ -424,9 +437,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
424 | // We remove the list of known regions from the agent's known region list through an event | 437 | // We remove the list of known regions from the agent's known region list through an event |
425 | // to scene, because, if an agent logged of, it's likely that there will be no scene presence | 438 | // to scene, because, if an agent logged of, it's likely that there will be no scene presence |
426 | // by the time we get to this part of the method. | 439 | // by the time we get to this part of the method. |
427 | if (OnRemoveKnownRegionFromAvatar != null) | 440 | handler008 = OnRemoveKnownRegionFromAvatar; |
441 | if (handler008 != null) | ||
428 | { | 442 | { |
429 | OnRemoveKnownRegionFromAvatar(agentID,regionlst); | 443 | handler008(agentID, regionlst); |
430 | } | 444 | } |
431 | } | 445 | } |
432 | 446 | ||