diff options
author | Melanie | 2011-02-07 22:08:53 +0000 |
---|---|---|
committer | Melanie | 2011-02-07 22:08:53 +0000 |
commit | 3889e68c5441218a2ffeb2094b8251d31369837b (patch) | |
tree | 69608c869c3823df4f417d9df34866f400045533 /OpenSim/Region/Framework/Scenes | |
parent | Repair x-query-string (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-3889e68c5441218a2ffeb2094b8251d31369837b.zip opensim-SC_OLD-3889e68c5441218a2ffeb2094b8251d31369837b.tar.gz opensim-SC_OLD-3889e68c5441218a2ffeb2094b8251d31369837b.tar.bz2 opensim-SC_OLD-3889e68c5441218a2ffeb2094b8251d31369837b.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Conflicts:
OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
OpenSim/Services/GridService/HypergridLinker.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 43 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 |
2 files changed, 24 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index c8af4c3..19cb0c1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -189,7 +189,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, ulong regionHandle); | 192 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest); |
193 | |||
193 | 194 | ||
194 | /// <summary> | 195 | /// <summary> |
195 | /// This informs all neighboring regions about the settings of it's child agent. | 196 | /// This informs all neighboring regions about the settings of it's child agent. |
@@ -198,31 +199,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
198 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. | 199 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. |
199 | /// | 200 | /// |
200 | /// </summary> | 201 | /// </summary> |
201 | private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, ulong regionHandle) | 202 | private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, GridRegion dest) |
202 | { | 203 | { |
203 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); | 204 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); |
204 | try | 205 | try |
205 | { | 206 | { |
206 | //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData); | 207 | m_scene.SimulationService.UpdateAgent(dest, cAgentData); |
207 | uint x = 0, y = 0; | ||
208 | Utils.LongToUInts(regionHandle, out x, out y); | ||
209 | GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
210 | m_scene.SimulationService.UpdateAgent(destination, cAgentData); | ||
211 | } | 208 | } |
212 | catch | 209 | catch |
213 | { | 210 | { |
214 | // Ignore; we did our best | 211 | // Ignore; we did our best |
215 | } | 212 | } |
216 | |||
217 | //if (regionAccepted) | ||
218 | //{ | ||
219 | // //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); | ||
220 | //} | ||
221 | //else | ||
222 | //{ | ||
223 | // //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); | ||
224 | //} | ||
225 | |||
226 | } | 213 | } |
227 | 214 | ||
228 | private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) | 215 | private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) |
@@ -236,14 +223,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
236 | // This assumes that we know what our neighbors are. | 223 | // This assumes that we know what our neighbors are. |
237 | try | 224 | try |
238 | { | 225 | { |
226 | uint x = 0, y = 0; | ||
227 | List<string> simulatorList = new List<string>(); | ||
239 | foreach (ulong regionHandle in presence.KnownChildRegionHandles) | 228 | foreach (ulong regionHandle in presence.KnownChildRegionHandles) |
240 | { | 229 | { |
241 | if (regionHandle != m_regionInfo.RegionHandle) | 230 | if (regionHandle != m_regionInfo.RegionHandle) |
242 | { | 231 | { |
243 | SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | 232 | // we only want to send one update to each simulator; the simulator will |
244 | d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, regionHandle, | 233 | // hand it off to the regions where a child agent exists, this does assume |
245 | SendChildAgentDataUpdateCompleted, | 234 | // that the region position is cached or performance will degrade |
246 | d); | 235 | Utils.LongToUInts(regionHandle, out x, out y); |
236 | GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
237 | if (! simulatorList.Contains(dest.ServerURI)) | ||
238 | { | ||
239 | // we havent seen this simulator before, add it to the list | ||
240 | // and send it an update | ||
241 | simulatorList.Add(dest.ServerURI); | ||
242 | |||
243 | SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | ||
244 | d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, | ||
245 | SendChildAgentDataUpdateCompleted, | ||
246 | d); | ||
247 | } | ||
247 | } | 248 | } |
248 | } | 249 | } |
249 | } | 250 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 6496a25..d4f3dfe 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2093,8 +2093,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2093 | 2093 | ||
2094 | public void GetProperties(IClientAPI client) | 2094 | public void GetProperties(IClientAPI client) |
2095 | { | 2095 | { |
2096 | //Viewer wants date in microseconds so multiply it by 1,000,000. | ||
2096 | client.SendObjectPropertiesReply( | 2097 | client.SendObjectPropertiesReply( |
2097 | m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, | 2098 | m_fromUserInventoryItemID, (ulong)_creationDate*(ulong)1e6, _creatorID, UUID.Zero, UUID.Zero, |
2098 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, | 2099 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, |
2099 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, | 2100 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, |
2100 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, | 2101 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, |