diff options
author | Jeff Ames | 2008-03-18 14:51:42 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-18 14:51:42 +0000 |
commit | bf8b5844f24d294c459f54147bd511e7112288bf (patch) | |
tree | 1b6a1ba4e9888d43694a8a33c21beb6913ce2d3a /OpenSim/Region | |
parent | * Applied Grumly57 patch for #781; Thanks, Grumly! (diff) | |
download | opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.zip opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.tar.gz opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.tar.bz2 opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.tar.xz |
Formatting cleanup. Minor refactoring.
Diffstat (limited to 'OpenSim/Region')
6 files changed, 109 insertions, 158 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 8cc1312..de891a2 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -212,6 +212,7 @@ namespace OpenSim.Region.Communications.Local | |||
212 | } | 212 | } |
213 | return mapBlocks; | 213 | return mapBlocks; |
214 | } | 214 | } |
215 | |||
215 | public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) | 216 | public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) |
216 | { | 217 | { |
217 | if (m_regionListeners.ContainsKey(regionHandle)) | 218 | if (m_regionListeners.ContainsKey(regionHandle)) |
@@ -245,7 +246,7 @@ namespace OpenSim.Region.Communications.Local | |||
245 | return false; | 246 | return false; |
246 | } | 247 | } |
247 | 248 | ||
248 | // This function Is only here to keep this class in line with the Grid Interface. | 249 | // This function is only here to keep this class in line with the Grid Interface. |
249 | // It never gets called. | 250 | // It never gets called. |
250 | public virtual Dictionary<string, string> GetGridSettings() | 251 | public virtual Dictionary<string, string> GetGridSettings() |
251 | { | 252 | { |
@@ -291,14 +292,15 @@ namespace OpenSim.Region.Communications.Local | |||
291 | } | 292 | } |
292 | return false; | 293 | return false; |
293 | } | 294 | } |
294 | /// <summary> | 295 | |
296 | /// <summary> | ||
297 | /// | ||
295 | /// </summary> | 298 | /// </summary> |
296 | /// <param name="regionHandle"></param> | 299 | /// <param name="regionHandle"></param> |
297 | /// <param name="agentData"></param> | 300 | /// <param name="agentData"></param> |
298 | /// <returns></returns> | 301 | /// <returns></returns> |
299 | /// | ||
300 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) | 302 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) |
301 | //should change from agentCircuitData | 303 | // TODO: should change from agentCircuitData |
302 | { | 304 | { |
303 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); | 305 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); |
304 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); | 306 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); |
@@ -352,8 +354,6 @@ namespace OpenSim.Region.Communications.Local | |||
352 | return false; | 354 | return false; |
353 | } | 355 | } |
354 | 356 | ||
355 | |||
356 | |||
357 | public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) | 357 | public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) |
358 | { | 358 | { |
359 | if (m_regionListeners.ContainsKey(regionHandle)) | 359 | if (m_regionListeners.ContainsKey(regionHandle)) |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index eff597e..dca8e65 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -68,7 +68,6 @@ namespace OpenSim.Region.Communications.Local | |||
68 | authUsers = authenticate; | 68 | authUsers = authenticate; |
69 | } | 69 | } |
70 | 70 | ||
71 | |||
72 | public override UserProfileData GetTheUser(string firstname, string lastname) | 71 | public override UserProfileData GetTheUser(string firstname, string lastname) |
73 | { | 72 | { |
74 | UserProfileData profile = m_userManager.GetUserProfile(firstname, lastname); | 73 | UserProfileData profile = m_userManager.GetUserProfile(firstname, lastname); |
@@ -189,6 +188,7 @@ namespace OpenSim.Region.Communications.Local | |||
189 | m_log.Warn("[LOGIN]: Not found region " + currentRegion); | 188 | m_log.Warn("[LOGIN]: Not found region " + currentRegion); |
190 | } | 189 | } |
191 | } | 190 | } |
191 | |||
192 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) | 192 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) |
193 | { | 193 | { |
194 | LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); | 194 | LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); |
@@ -199,10 +199,10 @@ namespace OpenSim.Region.Communications.Local | |||
199 | buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; | 199 | buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; |
200 | buddyitem.BuddyRightsGiven = (int)fl.FriendPerms; | 200 | buddyitem.BuddyRightsGiven = (int)fl.FriendPerms; |
201 | buddylistreturn.AddNewBuddy(buddyitem); | 201 | buddylistreturn.AddNewBuddy(buddyitem); |
202 | |||
203 | } | 202 | } |
204 | return buddylistreturn; | 203 | return buddylistreturn; |
205 | } | 204 | } |
205 | |||
206 | protected override InventoryData CreateInventoryData(LLUUID userID) | 206 | protected override InventoryData CreateInventoryData(LLUUID userID) |
207 | { | 207 | { |
208 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); | 208 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index b7fae65..f324886 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -134,7 +134,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
134 | { | 134 | { |
135 | GridReq = new XmlRpcRequest("simulator_login", SendParams); | 135 | GridReq = new XmlRpcRequest("simulator_login", SendParams); |
136 | GridResp = GridReq.Send(serversInfo.GridURL, 16000); | 136 | GridResp = GridReq.Send(serversInfo.GridURL, 16000); |
137 | } catch (Exception ex) | 137 | } |
138 | catch (Exception ex) | ||
138 | { | 139 | { |
139 | m_log.Error("Unable to connect to grid. Grid server not running?"); | 140 | m_log.Error("Unable to connect to grid. Grid server not running?"); |
140 | throw(ex); | 141 | throw(ex); |
@@ -182,7 +183,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
182 | Hashtable griddatahash = GridRespData; | 183 | Hashtable griddatahash = GridRespData; |
183 | 184 | ||
184 | // Process Response | 185 | // Process Response |
185 | if (GridRespData.ContainsKey("error")) { | 186 | if (GridRespData.ContainsKey("error")) |
187 | { | ||
186 | string errorstring = (string)GridRespData["error"]; | 188 | string errorstring = (string)GridRespData["error"]; |
187 | m_log.Error("Unable to connect to grid: " + errorstring); | 189 | m_log.Error("Unable to connect to grid: " + errorstring); |
188 | return false; | 190 | return false; |
@@ -202,7 +204,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
202 | returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); | 204 | returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); |
203 | } | 205 | } |
204 | 206 | ||
205 | |||
206 | m_queuedGridSettings.Clear(); | 207 | m_queuedGridSettings.Clear(); |
207 | } | 208 | } |
208 | 209 | ||
@@ -308,10 +309,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
308 | return regionInfo; | 309 | return regionInfo; |
309 | } | 310 | } |
310 | 311 | ||
311 | if (m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)) | 312 | if (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)) |
312 | { | ||
313 | } | ||
314 | else | ||
315 | { | 313 | { |
316 | try | 314 | try |
317 | { | 315 | { |
@@ -366,54 +364,51 @@ namespace OpenSim.Region.Communications.OGS1 | |||
366 | // Don't use this method. It's only for SLURLS and Logins | 364 | // Don't use this method. It's only for SLURLS and Logins |
367 | RegionInfo regionInfo = null; | 365 | RegionInfo regionInfo = null; |
368 | try | 366 | try |
369 | { | 367 | { |
370 | Hashtable requestData = new Hashtable(); | 368 | Hashtable requestData = new Hashtable(); |
371 | requestData["region_name_search"] = regionName; | 369 | requestData["region_name_search"] = regionName; |
372 | requestData["authkey"] = serversInfo.GridSendKey; | 370 | requestData["authkey"] = serversInfo.GridSendKey; |
373 | ArrayList SendParams = new ArrayList(); | 371 | ArrayList SendParams = new ArrayList(); |
374 | SendParams.Add(requestData); | 372 | SendParams.Add(requestData); |
375 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | 373 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); |
376 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); | 374 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); |
377 | 375 | ||
378 | Hashtable responseData = (Hashtable) GridResp.Value; | 376 | Hashtable responseData = (Hashtable) GridResp.Value; |
379 | 377 | ||
380 | if (responseData.ContainsKey("error")) | 378 | if (responseData.ContainsKey("error")) |
381 | { | 379 | { |
382 | m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); | 380 | m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); |
383 | return null; | 381 | return null; |
384 | } | 382 | } |
385 | 383 | ||
386 | uint regX = Convert.ToUInt32((string) responseData["region_locx"]); | 384 | uint regX = Convert.ToUInt32((string) responseData["region_locx"]); |
387 | uint regY = Convert.ToUInt32((string) responseData["region_locy"]); | 385 | uint regY = Convert.ToUInt32((string) responseData["region_locy"]); |
388 | string internalIpStr = (string) responseData["sim_ip"]; | 386 | string internalIpStr = (string) responseData["sim_ip"]; |
389 | uint port = Convert.ToUInt32(responseData["sim_port"]); | 387 | uint port = Convert.ToUInt32(responseData["sim_port"]); |
390 | string externalUri = (string) responseData["sim_uri"]; | 388 | string externalUri = (string) responseData["sim_uri"]; |
391 | 389 | ||
392 | IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port); | 390 | IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port); |
393 | string neighbourExternalUri = externalUri; | 391 | string neighbourExternalUri = externalUri; |
394 | regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); | 392 | regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); |
395 | 393 | ||
396 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 394 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
397 | regionInfo.RemotingAddress = internalIpStr; | 395 | regionInfo.RemotingAddress = internalIpStr; |
398 | 396 | ||
399 | regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); | 397 | regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); |
400 | regionInfo.RegionName = (string) responseData["region_name"]; | 398 | regionInfo.RegionName = (string) responseData["region_name"]; |
401 | 399 | ||
402 | m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); | 400 | m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); |
403 | } | 401 | } |
404 | catch (WebException) | 402 | catch (WebException) |
405 | { | 403 | { |
406 | m_log.Error("[OGS1 GRID SERVICES]: " + | 404 | m_log.Error("[OGS1 GRID SERVICES]: " + |
407 | "Region lookup failed for: " + regionName + | 405 | "Region lookup failed for: " + regionName + |
408 | " - Is the GridServer down?"); | 406 | " - Is the GridServer down?"); |
409 | } | 407 | } |
410 | |||
411 | 408 | ||
412 | return regionInfo; | 409 | return regionInfo; |
413 | |||
414 | } | 410 | } |
415 | 411 | ||
416 | |||
417 | /// <summary> | 412 | /// <summary> |
418 | /// | 413 | /// |
419 | /// </summary> | 414 | /// </summary> |
@@ -465,9 +460,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
465 | return neighbours; | 460 | return neighbours; |
466 | } | 461 | } |
467 | 462 | ||
468 | |||
469 | |||
470 | |||
471 | /// <summary> | 463 | /// <summary> |
472 | /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates | 464 | /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates |
473 | /// </summary> | 465 | /// </summary> |
@@ -519,7 +511,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
519 | return response; | 511 | return response; |
520 | } | 512 | } |
521 | 513 | ||
522 | |||
523 | // Grid Request Processing | 514 | // Grid Request Processing |
524 | /// <summary> | 515 | /// <summary> |
525 | /// Received from the user server when a user starts logging in. This call allows | 516 | /// Received from the user server when a user starts logging in. This call allows |
@@ -596,7 +587,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
596 | InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp; | 587 | InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp; |
597 | InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate; | 588 | InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate; |
598 | InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection; | 589 | InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection; |
599 | |||
600 | } | 590 | } |
601 | 591 | ||
602 | #region Methods called by regions in this instance | 592 | #region Methods called by regions in this instance |
@@ -629,10 +619,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
629 | 619 | ||
630 | 620 | ||
631 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 621 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
632 | typeof(OGS1InterRegionRemoting), | 622 | typeof(OGS1InterRegionRemoting), |
633 | "tcp://" + regInfo.RemotingAddress + | 623 | "tcp://" + regInfo.RemotingAddress + |
634 | ":" + regInfo.RemotingPort + | 624 | ":" + regInfo.RemotingPort + |
635 | "/InterRegions"); | 625 | "/InterRegions"); |
636 | 626 | ||
637 | if (remObject != null) | 627 | if (remObject != null) |
638 | { | 628 | { |
@@ -738,29 +728,27 @@ namespace OpenSim.Region.Communications.OGS1 | |||
738 | //don't want to be creating a new link to the remote instance every time like we are here | 728 | //don't want to be creating a new link to the remote instance every time like we are here |
739 | bool retValue = false; | 729 | bool retValue = false; |
740 | 730 | ||
731 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | ||
732 | typeof(OGS1InterRegionRemoting), | ||
733 | "tcp://" + regInfo.RemotingAddress + | ||
734 | ":" + regInfo.RemotingPort + | ||
735 | "/InterRegions"); | ||
741 | 736 | ||
742 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 737 | if (remObject != null) |
743 | typeof(OGS1InterRegionRemoting), | 738 | { |
744 | "tcp://" + regInfo.RemotingAddress + | 739 | retValue = remObject.InformRegionOfChildAgent(regionHandle, new sAgentCircuitData(agentData)); |
745 | ":" + regInfo.RemotingPort + | 740 | } |
746 | "/InterRegions"); | 741 | else |
747 | 742 | { | |
748 | if (remObject != null) | 743 | m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); |
749 | { | 744 | } |
750 | retValue = remObject.InformRegionOfChildAgent(regionHandle, new sAgentCircuitData(agentData)); | 745 | remObject = null; |
751 | } | 746 | m_log.Info("[OGS1 GRID SERVICES]: " + |
752 | else | 747 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + |
753 | { | 748 | agentData.firstname + " " + agentData.lastname + " and got " + |
754 | m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); | 749 | retValue.ToString()); |
755 | } | ||
756 | remObject = null; | ||
757 | m_log.Info("[OGS1 GRID SERVICES]: " + | ||
758 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + | ||
759 | agentData.firstname + " " + agentData.lastname + " and got " + | ||
760 | retValue.ToString()); | ||
761 | |||
762 | return retValue; | ||
763 | 750 | ||
751 | return retValue; | ||
764 | } | 752 | } |
765 | NoteDeadRegion(regionHandle); | 753 | NoteDeadRegion(regionHandle); |
766 | return false; | 754 | return false; |
@@ -849,14 +837,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
849 | //don't want to be creating a new link to the remote instance every time like we are here | 837 | //don't want to be creating a new link to the remote instance every time like we are here |
850 | bool retValue = false; | 838 | bool retValue = false; |
851 | 839 | ||
852 | |||
853 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | 840 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( |
854 | typeof ( | 841 | typeof(OGS1InterRegionRemoting), |
855 | OGS1InterRegionRemoting), | 842 | "tcp://" + |
856 | "tcp://" + | 843 | regInfo.RemotingAddress + |
857 | regInfo.RemotingAddress + | 844 | ":" + regInfo.RemotingPort + |
858 | ":" + regInfo.RemotingPort + | 845 | "/InterRegions"); |
859 | "/InterRegions"); | ||
860 | 846 | ||
861 | if (remObject != null) | 847 | if (remObject != null) |
862 | { | 848 | { |
@@ -939,7 +925,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
939 | /// <returns></returns> | 925 | /// <returns></returns> |
940 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | 926 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) |
941 | { | 927 | { |
942 | int failures = 0; | 928 | int failures = 0; |
943 | lock (m_deadRegionCache) | 929 | lock (m_deadRegionCache) |
944 | { | 930 | { |
945 | if (m_deadRegionCache.ContainsKey(regionHandle)) | 931 | if (m_deadRegionCache.ContainsKey(regionHandle)) |
@@ -963,12 +949,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
963 | //don't want to be creating a new link to the remote instance every time like we are here | 949 | //don't want to be creating a new link to the remote instance every time like we are here |
964 | bool retValue = false; | 950 | bool retValue = false; |
965 | 951 | ||
966 | |||
967 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 952 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
968 | typeof(OGS1InterRegionRemoting), | 953 | typeof(OGS1InterRegionRemoting), |
969 | "tcp://" + regInfo.RemotingAddress + | 954 | "tcp://" + regInfo.RemotingAddress + |
970 | ":" + regInfo.RemotingPort + | 955 | ":" + regInfo.RemotingPort + |
971 | "/InterRegions"); | 956 | "/InterRegions"); |
972 | 957 | ||
973 | if (remObject != null) | 958 | if (remObject != null) |
974 | { | 959 | { |
@@ -980,7 +965,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
980 | } | 965 | } |
981 | remObject = null; | 966 | remObject = null; |
982 | 967 | ||
983 | |||
984 | return retValue; | 968 | return retValue; |
985 | } | 969 | } |
986 | NoteDeadRegion(regionHandle); | 970 | NoteDeadRegion(regionHandle); |
@@ -1050,10 +1034,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1050 | { | 1034 | { |
1051 | bool retValue = false; | 1035 | bool retValue = false; |
1052 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | 1036 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( |
1053 | typeof (OGS1InterRegionRemoting), | 1037 | typeof (OGS1InterRegionRemoting), |
1054 | "tcp://" + regInfo.RemotingAddress + | 1038 | "tcp://" + regInfo.RemotingAddress + |
1055 | ":" + regInfo.RemotingPort + | 1039 | ":" + regInfo.RemotingPort + |
1056 | "/InterRegions"); | 1040 | "/InterRegions"); |
1041 | |||
1057 | if (remObject != null) | 1042 | if (remObject != null) |
1058 | { | 1043 | { |
1059 | retValue = | 1044 | retValue = |
@@ -1106,10 +1091,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1106 | { | 1091 | { |
1107 | bool retValue = false; | 1092 | bool retValue = false; |
1108 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | 1093 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( |
1109 | typeof (OGS1InterRegionRemoting), | 1094 | typeof (OGS1InterRegionRemoting), |
1110 | "tcp://" + regInfo.RemotingAddress + | 1095 | "tcp://" + regInfo.RemotingAddress + |
1111 | ":" + regInfo.RemotingPort + | 1096 | ":" + regInfo.RemotingPort + |
1112 | "/InterRegions"); | 1097 | "/InterRegions"); |
1098 | |||
1113 | if (remObject != null) | 1099 | if (remObject != null) |
1114 | { | 1100 | { |
1115 | retValue = | 1101 | retValue = |
@@ -1181,10 +1167,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1181 | { | 1167 | { |
1182 | bool retValue = false; | 1168 | bool retValue = false; |
1183 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 1169 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
1184 | typeof(OGS1InterRegionRemoting), | 1170 | typeof(OGS1InterRegionRemoting), |
1185 | "tcp://" + regInfo.RemotingAddress + | 1171 | "tcp://" + regInfo.RemotingAddress + |
1186 | ":" + regInfo.RemotingPort + | 1172 | ":" + regInfo.RemotingPort + |
1187 | "/InterRegions"); | 1173 | "/InterRegions"); |
1174 | |||
1188 | if (remObject != null) | 1175 | if (remObject != null) |
1189 | { | 1176 | { |
1190 | retValue = | 1177 | retValue = |
@@ -1211,7 +1198,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1211 | //m_log.Debug(e.ToString()); | 1198 | //m_log.Debug(e.ToString()); |
1212 | return false; | 1199 | return false; |
1213 | } | 1200 | } |
1214 | |||
1215 | catch (SocketException e) | 1201 | catch (SocketException e) |
1216 | { | 1202 | { |
1217 | NoteDeadRegion(regionHandle); | 1203 | NoteDeadRegion(regionHandle); |
@@ -1312,7 +1298,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1312 | { | 1298 | { |
1313 | if (m_deadRegionCache.ContainsKey(regionData.RegionHandle)) | 1299 | if (m_deadRegionCache.ContainsKey(regionData.RegionHandle)) |
1314 | { | 1300 | { |
1315 | |||
1316 | m_deadRegionCache.Remove(regionData.RegionHandle); | 1301 | m_deadRegionCache.Remove(regionData.RegionHandle); |
1317 | } | 1302 | } |
1318 | } | 1303 | } |
@@ -1356,7 +1341,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1356 | m_localBackend.TriggerExpectPrim(regionHandle, primID, objData); | 1341 | m_localBackend.TriggerExpectPrim(regionHandle, primID, objData); |
1357 | return true; | 1342 | return true; |
1358 | //m_localBackend. | 1343 | //m_localBackend. |
1359 | |||
1360 | } | 1344 | } |
1361 | catch (RemotingException e) | 1345 | catch (RemotingException e) |
1362 | { | 1346 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 61e1af3..11e94e0 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
177 | 177 | ||
178 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) | 178 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) |
179 | { | 179 | { |
180 | m_log.Warn("Terrain commands have been depreciated."); | 180 | m_log.Warn("Terrain commands have been deprecated."); |
181 | return false; | 181 | return false; |
182 | } | 182 | } |
183 | 183 | ||
@@ -332,11 +332,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
332 | public void SetCurrentSceneTimePhase(int timePhase) | 332 | public void SetCurrentSceneTimePhase(int timePhase) |
333 | { | 333 | { |
334 | ForEachCurrentScene(delegate(Scene scene) | 334 | ForEachCurrentScene(delegate(Scene scene) |
335 | { | 335 | { |
336 | scene.SetTimePhase( | 336 | scene.SetTimePhase( |
337 | timePhase) | 337 | timePhase) |
338 | ; | 338 | ; |
339 | }); | 339 | }); |
340 | } | 340 | } |
341 | 341 | ||
342 | public void ForceCurrentSceneClientUpdate() | 342 | public void ForceCurrentSceneClientUpdate() |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 1119db5..c63e1f7 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -33,9 +33,7 @@ using OpenSim.Framework; | |||
33 | namespace OpenSim.Region.Physics.Manager | 33 | namespace OpenSim.Region.Physics.Manager |
34 | { | 34 | { |
35 | public delegate void PositionUpdate(PhysicsVector position); | 35 | public delegate void PositionUpdate(PhysicsVector position); |
36 | |||
37 | public delegate void VelocityUpdate(PhysicsVector velocity); | 36 | public delegate void VelocityUpdate(PhysicsVector velocity); |
38 | |||
39 | public delegate void OrientationUpdate(Quaternion orientation); | 37 | public delegate void OrientationUpdate(Quaternion orientation); |
40 | 38 | ||
41 | public enum ActorTypes : int | 39 | public enum ActorTypes : int |
@@ -50,7 +48,6 @@ namespace OpenSim.Region.Physics.Manager | |||
50 | { | 48 | { |
51 | // Raising the event on the object, so don't need to provide location.. further up the tree knows that info. | 49 | // Raising the event on the object, so don't need to provide location.. further up the tree knows that info. |
52 | 50 | ||
53 | |||
54 | public int m_colliderType; | 51 | public int m_colliderType; |
55 | public int m_GenericStartEnd; | 52 | public int m_GenericStartEnd; |
56 | //public uint m_LocalID; | 53 | //public uint m_LocalID; |
@@ -88,13 +85,10 @@ namespace OpenSim.Region.Physics.Manager | |||
88 | } | 85 | } |
89 | } | 86 | } |
90 | 87 | ||
91 | |||
92 | public abstract class PhysicsActor | 88 | public abstract class PhysicsActor |
93 | { | 89 | { |
94 | public delegate void RequestTerseUpdate(); | 90 | public delegate void RequestTerseUpdate(); |
95 | |||
96 | public delegate void CollisionUpdate(EventArgs e); | 91 | public delegate void CollisionUpdate(EventArgs e); |
97 | |||
98 | public delegate void OutOfBounds(PhysicsVector pos); | 92 | public delegate void OutOfBounds(PhysicsVector pos); |
99 | 93 | ||
100 | #pragma warning disable 67 | 94 | #pragma warning disable 67 |
@@ -138,9 +132,7 @@ namespace OpenSim.Region.Physics.Manager | |||
138 | 132 | ||
139 | if (handler != null) | 133 | if (handler != null) |
140 | { | 134 | { |
141 | 135 | handler(); | |
142 | handler(); | ||
143 | |||
144 | } | 136 | } |
145 | } | 137 | } |
146 | 138 | ||
@@ -150,9 +142,10 @@ namespace OpenSim.Region.Physics.Manager | |||
150 | // a race condition if the last subscriber unsubscribes | 142 | // a race condition if the last subscriber unsubscribes |
151 | // immediately after the null check and before the event is raised. | 143 | // immediately after the null check and before the event is raised. |
152 | OutOfBounds handler = OnOutOfBounds; | 144 | OutOfBounds handler = OnOutOfBounds; |
145 | |||
153 | if (handler != null) | 146 | if (handler != null) |
154 | { | 147 | { |
155 | handler(pos); | 148 | handler(pos); |
156 | } | 149 | } |
157 | } | 150 | } |
158 | 151 | ||
@@ -162,54 +155,34 @@ namespace OpenSim.Region.Physics.Manager | |||
162 | 155 | ||
163 | if (handler != null) | 156 | if (handler != null) |
164 | { | 157 | { |
165 | handler(e); | 158 | handler(e); |
166 | } | 159 | } |
167 | |||
168 | } | 160 | } |
169 | 161 | ||
170 | |||
171 | public abstract PhysicsVector Position { get; set; } | 162 | public abstract PhysicsVector Position { get; set; } |
172 | |||
173 | public abstract float Mass { get; } | 163 | public abstract float Mass { get; } |
174 | |||
175 | public abstract PhysicsVector Force { get; } | 164 | public abstract PhysicsVector Force { get; } |
176 | |||
177 | public abstract PhysicsVector GeometricCenter { get; } | 165 | public abstract PhysicsVector GeometricCenter { get; } |
178 | |||
179 | public abstract PhysicsVector CenterOfMass { get; } | 166 | public abstract PhysicsVector CenterOfMass { get; } |
180 | |||
181 | public abstract PhysicsVector Velocity { get; set; } | 167 | public abstract PhysicsVector Velocity { get; set; } |
182 | |||
183 | public abstract float CollisionScore { get;} | 168 | public abstract float CollisionScore { get;} |
184 | |||
185 | public abstract PhysicsVector Acceleration { get; } | 169 | public abstract PhysicsVector Acceleration { get; } |
186 | |||
187 | public abstract Quaternion Orientation { get; set; } | 170 | public abstract Quaternion Orientation { get; set; } |
188 | public abstract int PhysicsActorType { get; set; } | 171 | public abstract int PhysicsActorType { get; set; } |
189 | |||
190 | public abstract bool IsPhysical { get; set; } | 172 | public abstract bool IsPhysical { get; set; } |
191 | |||
192 | public abstract bool Flying { get; set; } | 173 | public abstract bool Flying { get; set; } |
193 | public abstract bool SetAlwaysRun { get; set; } | 174 | public abstract bool SetAlwaysRun { get; set; } |
194 | public abstract bool ThrottleUpdates { get; set; } | 175 | public abstract bool ThrottleUpdates { get; set; } |
195 | |||
196 | public abstract bool IsColliding { get; set; } | 176 | public abstract bool IsColliding { get; set; } |
197 | public abstract bool CollidingGround { get; set; } | 177 | public abstract bool CollidingGround { get; set; } |
198 | public abstract bool CollidingObj { get; set; } | 178 | public abstract bool CollidingObj { get; set; } |
199 | |||
200 | public abstract bool FloatOnWater { set; } | 179 | public abstract bool FloatOnWater { set; } |
201 | |||
202 | public abstract PhysicsVector RotationalVelocity { get; set; } | 180 | public abstract PhysicsVector RotationalVelocity { get; set; } |
203 | |||
204 | public abstract bool Kinematic { get; set; } | 181 | public abstract bool Kinematic { get; set; } |
205 | |||
206 | public abstract float Buoyancy { get; set; } | 182 | public abstract float Buoyancy { get; set; } |
207 | 183 | ||
208 | public abstract void AddForce(PhysicsVector force); | 184 | public abstract void AddForce(PhysicsVector force); |
209 | |||
210 | public abstract void SetMomentum(PhysicsVector momentum); | 185 | public abstract void SetMomentum(PhysicsVector momentum); |
211 | |||
212 | |||
213 | } | 186 | } |
214 | 187 | ||
215 | public class NullPhysicsActor : PhysicsActor | 188 | public class NullPhysicsActor : PhysicsActor |
@@ -246,7 +219,8 @@ namespace OpenSim.Region.Physics.Manager | |||
246 | set { return; } | 219 | set { return; } |
247 | } | 220 | } |
248 | 221 | ||
249 | public override float Buoyancy { | 222 | public override float Buoyancy |
223 | { | ||
250 | get { return 0f; } | 224 | get { return 0f; } |
251 | set { return; } | 225 | set { return; } |
252 | } | 226 | } |
@@ -256,7 +230,6 @@ namespace OpenSim.Region.Physics.Manager | |||
256 | set { return; } | 230 | set { return; } |
257 | } | 231 | } |
258 | 232 | ||
259 | |||
260 | public override bool CollidingGround | 233 | public override bool CollidingGround |
261 | { | 234 | { |
262 | get { return false; } | 235 | get { return false; } |
@@ -313,10 +286,8 @@ namespace OpenSim.Region.Physics.Manager | |||
313 | 286 | ||
314 | public override void CrossingFailure() | 287 | public override void CrossingFailure() |
315 | { | 288 | { |
316 | |||
317 | } | 289 | } |
318 | 290 | ||
319 | |||
320 | public override Quaternion Orientation | 291 | public override Quaternion Orientation |
321 | { | 292 | { |
322 | get { return Quaternion.Identity; } | 293 | get { return Quaternion.Identity; } |
@@ -366,17 +337,14 @@ namespace OpenSim.Region.Physics.Manager | |||
366 | 337 | ||
367 | public override void link(PhysicsActor obj) | 338 | public override void link(PhysicsActor obj) |
368 | { | 339 | { |
369 | |||
370 | } | 340 | } |
371 | 341 | ||
372 | public override void delink() | 342 | public override void delink() |
373 | { | 343 | { |
374 | |||
375 | } | 344 | } |
376 | 345 | ||
377 | public override void AddForce(PhysicsVector force) | 346 | public override void AddForce(PhysicsVector force) |
378 | { | 347 | { |
379 | return; | ||
380 | } | 348 | } |
381 | 349 | ||
382 | public override PhysicsVector RotationalVelocity | 350 | public override PhysicsVector RotationalVelocity |
@@ -387,7 +355,6 @@ namespace OpenSim.Region.Physics.Manager | |||
387 | 355 | ||
388 | public override void SetMomentum(PhysicsVector momentum) | 356 | public override void SetMomentum(PhysicsVector momentum) |
389 | { | 357 | { |
390 | return; | ||
391 | } | 358 | } |
392 | } | 359 | } |
393 | } | 360 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index 8fea3a3..c025b5b 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | |||
@@ -142,7 +142,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
142 | } | 142 | } |
143 | 143 | ||
144 | public void SenseOnce(uint m_localID, LLUUID m_itemID, | 144 | public void SenseOnce(uint m_localID, LLUUID m_itemID, |
145 | string name, LLUUID keyID, int type, double range, double arc, SceneObjectPart host) | 145 | string name, LLUUID keyID, int type, |
146 | double range, double arc, SceneObjectPart host) | ||
146 | { | 147 | { |
147 | // Add to timer | 148 | // Add to timer |
148 | SenseRepeatClass ts = new SenseRepeatClass(); | 149 | SenseRepeatClass ts = new SenseRepeatClass(); |
@@ -210,7 +211,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
210 | 211 | ||
211 | foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) | 212 | foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) |
212 | { | 213 | { |
213 | |||
214 | LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; | 214 | LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; |
215 | double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); | 215 | double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); |
216 | if (dis <= ts.range) | 216 | if (dis <= ts.range) |