diff options
author | Charles Krinke | 2008-08-16 19:20:14 +0000 |
---|---|---|
committer | Charles Krinke | 2008-08-16 19:20:14 +0000 |
commit | d9cc908471922a1239bb8a757e07084072852982 (patch) | |
tree | 3390870e039a51194efa9c2e1e20142c9266dddd /OpenSim/Region/Environment/Scenes | |
parent | * Fix a rare maptile shading error, terrain difference mod 1 = 0 + abs = oops. (diff) | |
download | opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.zip opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.tar.gz opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.tar.bz2 opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.tar.xz |
Mantis#1965. Thank you kindly, HomerHorwitz for a patch that:
Places touched:
- Added two events for in-packets to LLCLientView: RegionHandleRequest and
ParcelInfoRequest
- Added sending of two out-packets to LLCLientView: RegionIDAndHandleReply and
ParcelInfoReply.
- Scene handles the RegionHandleRequest, LandManagementModule the
ParcelInfoRequest
- Added inter-region request for LandData by RegionHandle and local position.
This was implemented as XML-RPC request. The returned LandData isn't
complete, it only contains the data necessary for answering the
ParcelInfoRequest
- Added new CAPS (0009) for RemoteParcelRequest and some methods for LandData
handling to LandManagementModule
- Added methods for fake parcelID creation and parsing to Util
- Fixed missing implementation of interface methods.
- Added new file:
OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs
NOTE: This is part of the patch, too.
Due to the many places touched, I would consider this patch as experimental.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 16 |
2 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2e89e4b..9b0b53a 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2170,6 +2170,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2170 | client.OnScriptReset += ProcessScriptReset; | 2170 | client.OnScriptReset += ProcessScriptReset; |
2171 | client.OnGetScriptRunning += GetScriptRunning; | 2171 | client.OnGetScriptRunning += GetScriptRunning; |
2172 | client.OnSetScriptRunning += SetScriptRunning; | 2172 | client.OnSetScriptRunning += SetScriptRunning; |
2173 | |||
2174 | client.OnRegionHandleRequest += RegionHandleRequest; | ||
2173 | 2175 | ||
2174 | client.OnUnackedTerrain += TerrainUnAcked; | 2176 | client.OnUnackedTerrain += TerrainUnAcked; |
2175 | 2177 | ||
@@ -2502,6 +2504,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2502 | m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; | 2504 | m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; |
2503 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; | 2505 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; |
2504 | m_sceneGridService.KillObject += SendKillObject; | 2506 | m_sceneGridService.KillObject += SendKillObject; |
2507 | m_sceneGridService.OnGetLandData += GetLandData; | ||
2505 | } | 2508 | } |
2506 | 2509 | ||
2507 | /// <summary> | 2510 | /// <summary> |
@@ -2518,6 +2521,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2518 | m_sceneGridService.OnExpectUser -= NewUserConnection; | 2521 | m_sceneGridService.OnExpectUser -= NewUserConnection; |
2519 | m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing; | 2522 | m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing; |
2520 | m_sceneGridService.OnCloseAgentConnection -= CloseConnection; | 2523 | m_sceneGridService.OnCloseAgentConnection -= CloseConnection; |
2524 | m_sceneGridService.OnGetLandData -= GetLandData; | ||
2521 | 2525 | ||
2522 | m_sceneGridService.Close(); | 2526 | m_sceneGridService.Close(); |
2523 | } | 2527 | } |
@@ -3436,6 +3440,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
3436 | return LandChannel.GetLandObject(x, y).landData; | 3440 | return LandChannel.GetLandObject(x, y).landData; |
3437 | } | 3441 | } |
3438 | 3442 | ||
3443 | public LandData GetLandData(uint x, uint y) | ||
3444 | { | ||
3445 | m_log.DebugFormat("[SCENE] returning land for {0},{1}", x, y); | ||
3446 | return LandChannel.GetLandObject((int)x, (int)y).landData; | ||
3447 | } | ||
3448 | |||
3439 | public void SetLandMusicURL(float x, float y, string url) | 3449 | public void SetLandMusicURL(float x, float y, string url) |
3440 | { | 3450 | { |
3441 | ILandObject land = LandChannel.GetLandObject(x, y); | 3451 | ILandObject land = LandChannel.GetLandObject(x, y); |
@@ -3833,6 +3843,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
3833 | // client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); | 3843 | // client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); |
3834 | // }); | 3844 | // }); |
3835 | } | 3845 | } |
3846 | |||
3847 | public void RegionHandleRequest(IClientAPI client, LLUUID regionID) | ||
3848 | { | ||
3849 | RegionInfo info; | ||
3850 | if(regionID == RegionInfo.RegionID) info = RegionInfo; | ||
3851 | else info = CommsManager.GridService.RequestNeighbourInfo(regionID); | ||
3852 | if(info != null) client.SendRegionHandle(regionID, info.RegionHandle); | ||
3853 | } | ||
3836 | 3854 | ||
3837 | 3855 | ||
3838 | public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) | 3856 | public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 008d67a..35a7434 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -59,7 +59,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
59 | public event ChildAgentUpdate OnChildAgentUpdate; | 59 | public event ChildAgentUpdate OnChildAgentUpdate; |
60 | public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; | 60 | public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; |
61 | public event LogOffUser OnLogOffUser; | 61 | public event LogOffUser OnLogOffUser; |
62 | 62 | public event GetLandData OnGetLandData; | |
63 | |||
63 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; | 64 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; |
64 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; | 65 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; |
65 | private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; | 66 | private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; |
@@ -69,6 +70,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
69 | private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; | 70 | private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; |
70 | private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar; | 71 | private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar; |
71 | private LogOffUser handlerLogOffUser = null; | 72 | private LogOffUser handlerLogOffUser = null; |
73 | private GetLandData handlerGetLandData = null; // OnGetLandData | ||
72 | 74 | ||
73 | public KillObjectDelegate KillObject; | 75 | public KillObjectDelegate KillObject; |
74 | public string _debugRegionName = String.Empty; | 76 | public string _debugRegionName = String.Empty; |
@@ -108,6 +110,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
108 | regionCommsHost.OnRegionUp += newRegionUp; | 110 | regionCommsHost.OnRegionUp += newRegionUp; |
109 | regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; | 111 | regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; |
110 | regionCommsHost.OnLogOffUser += GridLogOffUser; | 112 | regionCommsHost.OnLogOffUser += GridLogOffUser; |
113 | regionCommsHost.OnGetLandData += FetchLandData; | ||
111 | } | 114 | } |
112 | else | 115 | else |
113 | { | 116 | { |
@@ -131,6 +134,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | regionCommsHost.OnExpectPrim -= IncomingPrimCrossing; | 134 | regionCommsHost.OnExpectPrim -= IncomingPrimCrossing; |
132 | regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; | 135 | regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; |
133 | regionCommsHost.OnCloseAgentConnection -= CloseConnection; | 136 | regionCommsHost.OnCloseAgentConnection -= CloseConnection; |
137 | regionCommsHost.OnGetLandData -= FetchLandData; | ||
134 | m_commsProvider.GridService.DeregisterRegion(m_regionInfo); | 138 | m_commsProvider.GridService.DeregisterRegion(m_regionInfo); |
135 | regionCommsHost = null; | 139 | regionCommsHost = null; |
136 | } | 140 | } |
@@ -227,6 +231,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
227 | return false; | 231 | return false; |
228 | } | 232 | } |
229 | 233 | ||
234 | protected LandData FetchLandData(uint x, uint y) | ||
235 | { | ||
236 | handlerGetLandData = OnGetLandData; | ||
237 | if (handlerGetLandData != null) | ||
238 | { | ||
239 | return handlerGetLandData(x, y); | ||
240 | } | ||
241 | return null; | ||
242 | } | ||
243 | |||
230 | #endregion | 244 | #endregion |
231 | 245 | ||
232 | #region Inform Client of Neighbours | 246 | #region Inform Client of Neighbours |