diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 40 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 74 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 58 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneViewer.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs | 4 |
8 files changed, 159 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d13d4fb..c7efc19 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -57,6 +57,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
57 | 57 | ||
58 | public partial class Scene : SceneBase | 58 | public partial class Scene : SceneBase |
59 | { | 59 | { |
60 | public enum UpdatePrioritizationSchemes { | ||
61 | Time = 0, | ||
62 | Distance = 1, | ||
63 | SimpleAngularDistance = 2, | ||
64 | } | ||
65 | |||
60 | public delegate void SynchronizeSceneHandler(Scene scene); | 66 | public delegate void SynchronizeSceneHandler(Scene scene); |
61 | public SynchronizeSceneHandler SynchronizeScene = null; | 67 | public SynchronizeSceneHandler SynchronizeScene = null; |
62 | 68 | ||
@@ -268,9 +274,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
268 | private volatile bool shuttingdown = false; | 274 | private volatile bool shuttingdown = false; |
269 | 275 | ||
270 | private int m_lastUpdate = Environment.TickCount; | 276 | private int m_lastUpdate = Environment.TickCount; |
271 | private int m_maxPrimsPerFrame = 200; | ||
272 | private bool m_firstHeartbeat = true; | 277 | private bool m_firstHeartbeat = true; |
273 | 278 | ||
279 | private UpdatePrioritizationSchemes m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time; | ||
280 | |||
274 | private object m_deleting_scene_object = new object(); | 281 | private object m_deleting_scene_object = new object(); |
275 | 282 | ||
276 | // the minimum time that must elapse before a changed object will be considered for persisted | 283 | // the minimum time that must elapse before a changed object will be considered for persisted |
@@ -282,6 +289,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
282 | 289 | ||
283 | #region Properties | 290 | #region Properties |
284 | 291 | ||
292 | public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return this.m_update_prioritization_scheme; } } | ||
293 | |||
285 | public AgentCircuitManager AuthenticateHandler | 294 | public AgentCircuitManager AuthenticateHandler |
286 | { | 295 | { |
287 | get { return m_authenticateHandler; } | 296 | get { return m_authenticateHandler; } |
@@ -326,12 +335,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
326 | get { return m_sceneGraph.m_syncRoot; } | 335 | get { return m_sceneGraph.m_syncRoot; } |
327 | } | 336 | } |
328 | 337 | ||
329 | public int MaxPrimsPerFrame | ||
330 | { | ||
331 | get { return m_maxPrimsPerFrame; } | ||
332 | set { m_maxPrimsPerFrame = value; } | ||
333 | } | ||
334 | |||
335 | /// <summary> | 338 | /// <summary> |
336 | /// This is for llGetRegionFPS | 339 | /// This is for llGetRegionFPS |
337 | /// </summary> | 340 | /// </summary> |
@@ -509,7 +512,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
509 | 512 | ||
510 | m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); | 513 | m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); |
511 | 514 | ||
512 | m_maxPrimsPerFrame = startupConfig.GetInt("MaxPrimsPerFrame", 200); | ||
513 | IConfig packetConfig = m_config.Configs["PacketPool"]; | 515 | IConfig packetConfig = m_config.Configs["PacketPool"]; |
514 | if (packetConfig != null) | 516 | if (packetConfig != null) |
515 | { | 517 | { |
@@ -518,6 +520,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
518 | } | 520 | } |
519 | 521 | ||
520 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); | 522 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); |
523 | |||
524 | IConfig interest_management_config = m_config.Configs["InterestManagement"]; | ||
525 | if (interest_management_config != null) | ||
526 | { | ||
527 | string update_prioritization_scheme = interest_management_config.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower(); | ||
528 | switch (update_prioritization_scheme) | ||
529 | { | ||
530 | case "time": | ||
531 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time; | ||
532 | break; | ||
533 | case "distance": | ||
534 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.Distance; | ||
535 | break; | ||
536 | case "simpleangulardistance": | ||
537 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.SimpleAngularDistance; | ||
538 | break; | ||
539 | default: | ||
540 | m_log.Warn("[SCENE]: UpdatePrioritizationScheme was not recognized, setting to default settomg of Time"); | ||
541 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time; | ||
542 | break; | ||
543 | } | ||
544 | } | ||
521 | } | 545 | } |
522 | catch | 546 | catch |
523 | { | 547 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 04397ad..b9872ca 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -613,7 +613,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
613 | 613 | ||
614 | newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance); | 614 | newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance); |
615 | newAvatar.IsChildAgent = true; | 615 | newAvatar.IsChildAgent = true; |
616 | newAvatar.MaxPrimsPerFrame = m_parentScene.MaxPrimsPerFrame; | ||
617 | 616 | ||
618 | AddScenePresence(newAvatar); | 617 | AddScenePresence(newAvatar); |
619 | 618 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index d4cef7d..2153b9b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1817,7 +1817,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1817 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags) | 1817 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags) |
1818 | { | 1818 | { |
1819 | 1819 | ||
1820 | remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.ObjectOwner, RootPart.GroupID, RootPart.BaseMask, | 1820 | remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask, |
1821 | RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, | 1821 | RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, |
1822 | RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, | 1822 | RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, |
1823 | RootPart.CreatorID, RootPart.Name, RootPart.Description); | 1823 | RootPart.CreatorID, RootPart.Name, RootPart.Description); |
@@ -3343,5 +3343,77 @@ namespace OpenSim.Region.Framework.Scenes | |||
3343 | 3343 | ||
3344 | return true; | 3344 | return true; |
3345 | } | 3345 | } |
3346 | |||
3347 | public double GetUpdatePriority(IClientAPI client) | ||
3348 | { | ||
3349 | switch (Scene.UpdatePrioritizationScheme) | ||
3350 | { | ||
3351 | case Scene.UpdatePrioritizationSchemes.Time: | ||
3352 | return GetPriorityByTime(); | ||
3353 | case Scene.UpdatePrioritizationSchemes.Distance: | ||
3354 | return GetPriorityByDistance(client); | ||
3355 | case Scene.UpdatePrioritizationSchemes.SimpleAngularDistance: | ||
3356 | return GetPriorityBySimpleAngularDistance(client); | ||
3357 | default: | ||
3358 | throw new InvalidOperationException("UpdatePrioritizationScheme not defined"); | ||
3359 | } | ||
3360 | } | ||
3361 | |||
3362 | private double GetPriorityByTime() | ||
3363 | { | ||
3364 | return DateTime.Now.ToOADate(); | ||
3365 | } | ||
3366 | |||
3367 | private double GetPriorityByDistance(IClientAPI client) | ||
3368 | { | ||
3369 | ScenePresence presence = Scene.GetScenePresence(client.AgentId); | ||
3370 | if (presence != null) | ||
3371 | { | ||
3372 | return GetPriorityByDistance((presence.IsChildAgent) ? | ||
3373 | presence.AbsolutePosition : presence.CameraPosition); | ||
3374 | } | ||
3375 | return double.NaN; | ||
3376 | } | ||
3377 | |||
3378 | private double GetPriorityBySimpleAngularDistance(IClientAPI client) | ||
3379 | { | ||
3380 | ScenePresence presence = Scene.GetScenePresence(client.AgentId); | ||
3381 | if (presence != null) | ||
3382 | { | ||
3383 | return GetPriorityBySimpleAngularDistance((presence.IsChildAgent) ? | ||
3384 | presence.AbsolutePosition : presence.CameraPosition); | ||
3385 | } | ||
3386 | return double.NaN; | ||
3387 | } | ||
3388 | |||
3389 | public double GetPriorityByDistance(Vector3 position) | ||
3390 | { | ||
3391 | return Vector3.Distance(AbsolutePosition, position); | ||
3392 | } | ||
3393 | |||
3394 | public double GetPriorityBySimpleAngularDistance(Vector3 position) | ||
3395 | { | ||
3396 | double distance = Vector3.Distance(position, AbsolutePosition); | ||
3397 | if (distance >= double.Epsilon) | ||
3398 | { | ||
3399 | float height; | ||
3400 | Vector3 box = GetAxisAlignedBoundingBox(out height); | ||
3401 | |||
3402 | double angle = box.X / distance; | ||
3403 | double max = angle; | ||
3404 | |||
3405 | angle = box.Y / distance; | ||
3406 | if (max < angle) | ||
3407 | max = angle; | ||
3408 | |||
3409 | angle = box.Z / distance; | ||
3410 | if (max < angle) | ||
3411 | max = angle; | ||
3412 | |||
3413 | return -max; | ||
3414 | } | ||
3415 | else | ||
3416 | return double.MinValue; | ||
3417 | } | ||
3346 | } | 3418 | } |
3347 | } | 3419 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 377cb6e..79f6366 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2400,10 +2400,10 @@ if (m_shape != null) { | |||
2400 | //isattachment = ParentGroup.RootPart.IsAttachment; | 2400 | //isattachment = ParentGroup.RootPart.IsAttachment; |
2401 | 2401 | ||
2402 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; | 2402 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; |
2403 | remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, | 2403 | remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, |
2404 | lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID, | 2404 | lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID, |
2405 | m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, | 2405 | m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, |
2406 | AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius); | 2406 | AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); |
2407 | } | 2407 | } |
2408 | 2408 | ||
2409 | /// <summary> | 2409 | /// <summary> |
@@ -3794,12 +3794,12 @@ if (m_shape != null) { | |||
3794 | 3794 | ||
3795 | // Causes this thread to dig into the Client Thread Data. | 3795 | // Causes this thread to dig into the Client Thread Data. |
3796 | // Remember your locking here! | 3796 | // Remember your locking here! |
3797 | remoteClient.SendPrimTerseUpdate(m_regionHandle, | 3797 | remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle, |
3798 | (ushort)(m_parentGroup.GetTimeDilation() * | 3798 | (ushort)(m_parentGroup.GetTimeDilation() * |
3799 | (float)ushort.MaxValue), LocalId, lPos, | 3799 | (float)ushort.MaxValue), LocalId, lPos, |
3800 | RotationOffset, Velocity, | 3800 | RotationOffset, Velocity, |
3801 | RotationalVelocity, state, FromItemID, | 3801 | RotationalVelocity, state, FromItemID, |
3802 | OwnerID, (int)AttachmentPoint); | 3802 | OwnerID, (int)AttachmentPoint, ParentGroup.GetUpdatePriority(remoteClient))); |
3803 | } | 3803 | } |
3804 | 3804 | ||
3805 | public void AddScriptLPS(int count) | 3805 | public void AddScriptLPS(int count) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 387db44..a5b88c6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -403,12 +403,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
403 | set { m_parentPosition = value; } | 403 | set { m_parentPosition = value; } |
404 | } | 404 | } |
405 | 405 | ||
406 | public int MaxPrimsPerFrame | ||
407 | { | ||
408 | get { return m_sceneViewer.MaxPrimsPerFrame; } | ||
409 | set { m_sceneViewer.MaxPrimsPerFrame = value; } | ||
410 | } | ||
411 | |||
412 | /// <summary> | 406 | /// <summary> |
413 | /// Absolute position of this avatar in 'region cordinates' | 407 | /// Absolute position of this avatar in 'region cordinates' |
414 | /// </summary> | 408 | /// </summary> |
@@ -2457,8 +2451,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2457 | Vector3 pos = m_pos; | 2451 | Vector3 pos = m_pos; |
2458 | pos.Z -= m_appearance.HipOffset; | 2452 | pos.Z -= m_appearance.HipOffset; |
2459 | 2453 | ||
2460 | remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), | 2454 | remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, |
2461 | LocalId, pos, Velocity, m_bodyRot, m_uuid); | 2455 | pos, m_velocity, m_rotation, m_uuid, GetUpdatePriority(remoteClient))); |
2462 | 2456 | ||
2463 | m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); | 2457 | m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); |
2464 | m_scene.StatsReporter.AddAgentUpdates(1); | 2458 | m_scene.StatsReporter.AddAgentUpdates(1); |
@@ -2563,9 +2557,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2563 | Vector3 pos = m_pos; | 2557 | Vector3 pos = m_pos; |
2564 | pos.Z -= m_appearance.HipOffset; | 2558 | pos.Z -= m_appearance.HipOffset; |
2565 | 2559 | ||
2566 | remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, | 2560 | remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, |
2567 | LocalId, m_pos, m_appearance.Texture.GetBytes(), | 2561 | LocalId, m_pos, m_appearance.Texture.GetBytes(), |
2568 | m_parentID, rot); | 2562 | m_parentID, rot)); |
2569 | m_scene.StatsReporter.AddAgentUpdates(1); | 2563 | m_scene.StatsReporter.AddAgentUpdates(1); |
2570 | } | 2564 | } |
2571 | 2565 | ||
@@ -2634,8 +2628,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2634 | Vector3 pos = m_pos; | 2628 | Vector3 pos = m_pos; |
2635 | pos.Z -= m_appearance.HipOffset; | 2629 | pos.Z -= m_appearance.HipOffset; |
2636 | 2630 | ||
2637 | m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2631 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, |
2638 | m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot); | 2632 | m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot)); |
2639 | 2633 | ||
2640 | if (!m_isChildAgent) | 2634 | if (!m_isChildAgent) |
2641 | { | 2635 | { |
@@ -2741,8 +2735,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2741 | } | 2735 | } |
2742 | 2736 | ||
2743 | Quaternion rot = m_bodyRot; | 2737 | Quaternion rot = m_bodyRot; |
2744 | m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2738 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, |
2745 | m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot); | 2739 | m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot)); |
2746 | 2740 | ||
2747 | } | 2741 | } |
2748 | 2742 | ||
@@ -3870,5 +3864,41 @@ namespace OpenSim.Region.Framework.Scenes | |||
3870 | } | 3864 | } |
3871 | } | 3865 | } |
3872 | } | 3866 | } |
3867 | |||
3868 | public double GetUpdatePriority(IClientAPI client) | ||
3869 | { | ||
3870 | switch (Scene.UpdatePrioritizationScheme) | ||
3871 | { | ||
3872 | case Scene.UpdatePrioritizationSchemes.Time: | ||
3873 | return GetPriorityByTime(); | ||
3874 | case Scene.UpdatePrioritizationSchemes.Distance: | ||
3875 | return GetPriorityByDistance(client); | ||
3876 | case Scene.UpdatePrioritizationSchemes.SimpleAngularDistance: | ||
3877 | return GetPriorityByDistance(client); | ||
3878 | default: | ||
3879 | throw new InvalidOperationException("UpdatePrioritizationScheme not defined."); | ||
3880 | } | ||
3881 | } | ||
3882 | |||
3883 | private double GetPriorityByTime() | ||
3884 | { | ||
3885 | return DateTime.Now.ToOADate(); | ||
3886 | } | ||
3887 | |||
3888 | private double GetPriorityByDistance(IClientAPI client) | ||
3889 | { | ||
3890 | ScenePresence presence = Scene.GetScenePresence(client.AgentId); | ||
3891 | if (presence != null) | ||
3892 | { | ||
3893 | return GetPriorityByDistance((presence.IsChildAgent) ? | ||
3894 | presence.AbsolutePosition : presence.CameraPosition); | ||
3895 | } | ||
3896 | return double.NaN; | ||
3897 | } | ||
3898 | |||
3899 | private double GetPriorityByDistance(Vector3 position) | ||
3900 | { | ||
3901 | return Vector3.Distance(AbsolutePosition, position); | ||
3902 | } | ||
3873 | } | 3903 | } |
3874 | } | 3904 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 8ab0552..e4296ef 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -45,14 +45,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
45 | 45 | ||
46 | protected Dictionary<UUID, ScenePartUpdate> m_updateTimes = new Dictionary<UUID, ScenePartUpdate>(); | 46 | protected Dictionary<UUID, ScenePartUpdate> m_updateTimes = new Dictionary<UUID, ScenePartUpdate>(); |
47 | 47 | ||
48 | protected int m_maxPrimsPerFrame = 200; | ||
49 | |||
50 | public int MaxPrimsPerFrame | ||
51 | { | ||
52 | get { return m_maxPrimsPerFrame; } | ||
53 | set { m_maxPrimsPerFrame = value; } | ||
54 | } | ||
55 | |||
56 | public SceneViewer() | 48 | public SceneViewer() |
57 | { | 49 | { |
58 | } | 50 | } |
@@ -82,16 +74,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
82 | { | 74 | { |
83 | m_pendingObjects = new Queue<SceneObjectGroup>(); | 75 | m_pendingObjects = new Queue<SceneObjectGroup>(); |
84 | 76 | ||
85 | List<EntityBase> ents = new List<EntityBase>(m_presence.Scene.Entities); | 77 | foreach (EntityBase e in m_presence.Scene.Entities) |
86 | if (!m_presence.IsChildAgent) // Proximity sort makes no sense for | ||
87 | { // Child agents | ||
88 | ents.Sort(delegate(EntityBase a, EntityBase b) | ||
89 | { | ||
90 | return Vector3.Distance(m_presence.AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(m_presence.AbsolutePosition, b.AbsolutePosition)); | ||
91 | }); | ||
92 | } | ||
93 | |||
94 | foreach (EntityBase e in ents) | ||
95 | { | 78 | { |
96 | if (e is SceneObjectGroup) | 79 | if (e is SceneObjectGroup) |
97 | m_pendingObjects.Enqueue((SceneObjectGroup)e); | 80 | m_pendingObjects.Enqueue((SceneObjectGroup)e); |
@@ -99,7 +82,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
99 | } | 82 | } |
100 | } | 83 | } |
101 | 84 | ||
102 | while (m_pendingObjects != null && m_pendingObjects.Count > 0 && m_partsUpdateQueue.Count < m_maxPrimsPerFrame) | 85 | while (m_pendingObjects != null && m_pendingObjects.Count > 0) |
103 | { | 86 | { |
104 | SceneObjectGroup g = m_pendingObjects.Dequeue(); | 87 | SceneObjectGroup g = m_pendingObjects.Dequeue(); |
105 | 88 | ||
@@ -183,8 +166,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
183 | m_presence.GenerateClientFlags(part.UUID)); | 166 | m_presence.GenerateClientFlags(part.UUID)); |
184 | } | 167 | } |
185 | } | 168 | } |
186 | |||
187 | m_presence.ControllingClient.FlushPrimUpdates(); | ||
188 | } | 169 | } |
189 | 170 | ||
190 | public void Reset() | 171 | public void Reset() |
diff --git a/OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs b/OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs index 29c4672..f3be028 100644 --- a/OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs +++ b/OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs | |||
@@ -35,8 +35,8 @@ namespace OpenSim.Region.Framework.Scenes.Scripting | |||
35 | string Description { get; set; } | 35 | string Description { get; set; } |
36 | 36 | ||
37 | UUID UUID { get; } | 37 | UUID UUID { get; } |
38 | UUID ObjectOwner { get; } | 38 | UUID OwnerID { get; } |
39 | UUID ObjectCreator { get; } | 39 | UUID CreatorID { get; } |
40 | Vector3 AbsolutePosition { get; } | 40 | Vector3 AbsolutePosition { get; } |
41 | 41 | ||
42 | string SitName { get; set; } | 42 | string SitName { get; set; } |
diff --git a/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs b/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs index af18a98..d7198f0 100644 --- a/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs +++ b/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs | |||
@@ -68,12 +68,12 @@ namespace OpenSim.Region.Framework.Scenes.Scripting | |||
68 | get { return UUID.Zero; } | 68 | get { return UUID.Zero; } |
69 | } | 69 | } |
70 | 70 | ||
71 | public UUID ObjectOwner | 71 | public UUID OwnerID |
72 | { | 72 | { |
73 | get { return UUID.Zero; } | 73 | get { return UUID.Zero; } |
74 | } | 74 | } |
75 | 75 | ||
76 | public UUID ObjectCreator | 76 | public UUID CreatorID |
77 | { | 77 | { |
78 | get { return UUID.Zero; } | 78 | get { return UUID.Zero; } |
79 | } | 79 | } |