diff options
author | BlueWall | 2011-02-12 20:42:11 -0500 |
---|---|---|
committer | BlueWall | 2011-02-12 20:42:11 -0500 |
commit | c0e1742d479d4390701688da685892555f28bfbc (patch) | |
tree | 39d717dd9ce4c453898eca2237f9fc2d2879c1d4 /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' of /home/opensim/src/OpenSim/Core (diff) | |
parent | Fixed a couple of tests in the HttpServer. Not sure if this is enough. Mantis... (diff) | |
download | opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.zip opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.tar.gz opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.tar.bz2 opensim-SC-c0e1742d479d4390701688da685892555f28bfbc.tar.xz |
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
4 files changed, 34 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4fca261..355671c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
64 | 64 | ||
65 | #region Fields | 65 | #region Fields |
66 | 66 | ||
67 | public bool EmergencyMonitoring = false; | ||
68 | |||
67 | public SynchronizeSceneHandler SynchronizeScene; | 69 | public SynchronizeSceneHandler SynchronizeScene; |
68 | public SimStatsReporter StatsReporter; | 70 | public SimStatsReporter StatsReporter; |
69 | public List<Border> NorthBorders = new List<Border>(); | 71 | public List<Border> NorthBorders = new List<Border>(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index f8ff308..837e655 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -193,7 +193,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, ulong regionHandle); | 196 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest); |
197 | |||
197 | 198 | ||
198 | /// <summary> | 199 | /// <summary> |
199 | /// This informs all neighboring regions about the settings of it's child agent. | 200 | /// This informs all neighboring regions about the settings of it's child agent. |
@@ -202,31 +203,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
202 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. | 203 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. |
203 | /// | 204 | /// |
204 | /// </summary> | 205 | /// </summary> |
205 | private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, ulong regionHandle) | 206 | private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, GridRegion dest) |
206 | { | 207 | { |
207 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); | 208 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); |
208 | try | 209 | try |
209 | { | 210 | { |
210 | //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData); | 211 | m_scene.SimulationService.UpdateAgent(dest, cAgentData); |
211 | uint x = 0, y = 0; | ||
212 | Utils.LongToUInts(regionHandle, out x, out y); | ||
213 | GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
214 | m_scene.SimulationService.UpdateAgent(destination, cAgentData); | ||
215 | } | 212 | } |
216 | catch | 213 | catch |
217 | { | 214 | { |
218 | // Ignore; we did our best | 215 | // Ignore; we did our best |
219 | } | 216 | } |
220 | |||
221 | //if (regionAccepted) | ||
222 | //{ | ||
223 | // //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); | ||
224 | //} | ||
225 | //else | ||
226 | //{ | ||
227 | // //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); | ||
228 | //} | ||
229 | |||
230 | } | 217 | } |
231 | 218 | ||
232 | private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) | 219 | private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) |
@@ -240,14 +227,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
240 | // This assumes that we know what our neighbors are. | 227 | // This assumes that we know what our neighbors are. |
241 | try | 228 | try |
242 | { | 229 | { |
230 | uint x = 0, y = 0; | ||
231 | List<string> simulatorList = new List<string>(); | ||
243 | foreach (ulong regionHandle in presence.KnownChildRegionHandles) | 232 | foreach (ulong regionHandle in presence.KnownChildRegionHandles) |
244 | { | 233 | { |
245 | if (regionHandle != m_regionInfo.RegionHandle) | 234 | if (regionHandle != m_regionInfo.RegionHandle) |
246 | { | 235 | { |
247 | SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | 236 | // we only want to send one update to each simulator; the simulator will |
248 | d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, regionHandle, | 237 | // hand it off to the regions where a child agent exists, this does assume |
249 | SendChildAgentDataUpdateCompleted, | 238 | // that the region position is cached or performance will degrade |
250 | d); | 239 | Utils.LongToUInts(regionHandle, out x, out y); |
240 | GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
241 | if (! simulatorList.Contains(dest.ServerURI)) | ||
242 | { | ||
243 | // we havent seen this simulator before, add it to the list | ||
244 | // and send it an update | ||
245 | simulatorList.Add(dest.ServerURI); | ||
246 | |||
247 | SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | ||
248 | d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, | ||
249 | SendChildAgentDataUpdateCompleted, | ||
250 | d); | ||
251 | } | ||
251 | } | 252 | } |
252 | } | 253 | } |
253 | } | 254 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4fcd8f5..6a92378 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2055,8 +2055,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2055 | 2055 | ||
2056 | public void GetProperties(IClientAPI client) | 2056 | public void GetProperties(IClientAPI client) |
2057 | { | 2057 | { |
2058 | //Viewer wants date in microseconds so multiply it by 1,000,000. | ||
2058 | client.SendObjectPropertiesReply( | 2059 | client.SendObjectPropertiesReply( |
2059 | m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, | 2060 | m_fromUserInventoryItemID, (ulong)_creationDate*(ulong)1e6, _creatorID, UUID.Zero, UUID.Zero, |
2060 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, | 2061 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, |
2061 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, | 2062 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, |
2062 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, | 2063 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, |
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index b44a010..7c067ca 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -205,6 +205,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
205 | Reset(); | 205 | Reset(); |
206 | } | 206 | } |
207 | 207 | ||
208 | public int GetPendingObjectsCount() | ||
209 | { | ||
210 | if (m_pendingObjects != null) | ||
211 | return m_pendingObjects.Count; | ||
212 | |||
213 | return 0; | ||
214 | } | ||
215 | |||
208 | public class ScenePartUpdate | 216 | public class ScenePartUpdate |
209 | { | 217 | { |
210 | public UUID FullID; | 218 | public UUID FullID; |