diff options
author | UbitUmarov | 2016-07-07 12:21:50 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-07 12:23:53 +0100 |
commit | f768effa87efb6ff00fc1808bf7f11c45f3695e5 (patch) | |
tree | 8662b4090f8a43a8897159b31721856f69ad2fae /OpenSim/Region | |
parent | avoid InvalidBoundsRadius() calls caused by small changes (diff) | |
download | opensim-SC_OLD-f768effa87efb6ff00fc1808bf7f11c45f3695e5.zip opensim-SC_OLD-f768effa87efb6ff00fc1808bf7f11c45f3695e5.tar.gz opensim-SC_OLD-f768effa87efb6ff00fc1808bf7f11c45f3695e5.tar.bz2 opensim-SC_OLD-f768effa87efb6ff00fc1808bf7f11c45f3695e5.tar.xz |
move object inventory send to udp queue asset ( was task). Remove a call
to RefreshGroupMembership() on start. It was too soon and its Groups
module job
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 44 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 6 |
2 files changed, 23 insertions, 27 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index be992b4..383031c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -837,7 +837,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
837 | { | 837 | { |
838 | m_scene.AddNewAgent(this, PresenceType.User); | 838 | m_scene.AddNewAgent(this, PresenceType.User); |
839 | 839 | ||
840 | RefreshGroupMembership(); | 840 | // RefreshGroupMembership(); |
841 | } | 841 | } |
842 | 842 | ||
843 | # endregion | 843 | # endregion |
@@ -2281,14 +2281,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2281 | replytask.InventoryData.TaskID = taskID; | 2281 | replytask.InventoryData.TaskID = taskID; |
2282 | replytask.InventoryData.Serial = serial; | 2282 | replytask.InventoryData.Serial = serial; |
2283 | replytask.InventoryData.Filename = fileName; | 2283 | replytask.InventoryData.Filename = fileName; |
2284 | OutPacket(replytask, ThrottleOutPacketType.Task); | 2284 | // OutPacket(replytask, ThrottleOutPacketType.Task); |
2285 | OutPacket(replytask, ThrottleOutPacketType.Asset); | ||
2285 | } | 2286 | } |
2286 | 2287 | ||
2287 | public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) | 2288 | public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
2288 | { | 2289 | { |
2289 | ThrottleOutPacketType type = ThrottleOutPacketType.Asset; | 2290 | ThrottleOutPacketType type = ThrottleOutPacketType.Asset; |
2290 | if (isTaskInventory) | 2291 | // if (isTaskInventory) |
2291 | type = ThrottleOutPacketType.Task; | 2292 | // type = ThrottleOutPacketType.Task; |
2292 | 2293 | ||
2293 | SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket); | 2294 | SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket); |
2294 | sendXfer.XferID.ID = xferID; | 2295 | sendXfer.XferID.ID = xferID; |
@@ -4361,30 +4362,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4361 | HashSet<SceneObjectGroup> NewGroupsInView = new HashSet<SceneObjectGroup>(); | 4362 | HashSet<SceneObjectGroup> NewGroupsInView = new HashSet<SceneObjectGroup>(); |
4362 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); | 4363 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); |
4363 | 4364 | ||
4364 | |||
4365 | // will this take for ever ? | 4365 | // will this take for ever ? |
4366 | lock(GroupsInView) | 4366 | lock(GroupsInView) |
4367 | { | 4367 | { |
4368 | EntityBase[] entities = m_scene.Entities.GetEntities(); | 4368 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
4369 | foreach (EntityBase e in entities) | 4369 | foreach (EntityBase e in entities) |
4370 | { | ||
4371 | if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment) | ||
4372 | { | 4370 | { |
4373 | SceneObjectGroup grp = (SceneObjectGroup)e; | 4371 | if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment) |
4374 | Vector3 grppos = grp.AbsolutePosition; | ||
4375 | float dcam = (grppos - mycamera).LengthSquared(); | ||
4376 | float dpos = (grppos - mypos).LengthSquared(); | ||
4377 | if(dcam < dpos) | ||
4378 | dpos = dcam; | ||
4379 | dpos = (float)Math.Sqrt(dpos) - grp.GetBoundsRadius(); | ||
4380 | if(dpos > cullingrange) | ||
4381 | { | 4372 | { |
4382 | if(GroupsInView.Contains(grp)) | 4373 | SceneObjectGroup grp = (SceneObjectGroup)e; |
4374 | Vector3 grppos = grp.AbsolutePosition; | ||
4375 | float dcam = (grppos - mycamera).LengthSquared(); | ||
4376 | float dpos = (grppos - mypos).LengthSquared(); | ||
4377 | if(dcam < dpos) | ||
4378 | dpos = dcam; | ||
4379 | dpos = (float)Math.Sqrt(dpos) - grp.GetBoundsRadius(); | ||
4380 | if(dpos > cullingrange) | ||
4383 | { | 4381 | { |
4384 | GroupsInView.Remove(grp); | 4382 | if(GroupsInView.Contains(grp)) |
4385 | if (!m_killRecord.Contains(grp.LocalId)) | 4383 | { |
4386 | m_killRecord.Add(grp.LocalId); | 4384 | GroupsInView.Remove(grp); |
4387 | } | 4385 | if (!m_killRecord.Contains(grp.LocalId)) |
4386 | m_killRecord.Add(grp.LocalId); | ||
4387 | } | ||
4388 | } | 4388 | } |
4389 | else | 4389 | else |
4390 | { | 4390 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index d7e2c46..a46232c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1178,11 +1178,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1178 | if (ParentGroup.Scene.PhysicsScene != null) | 1178 | if (ParentGroup.Scene.PhysicsScene != null) |
1179 | { | 1179 | { |
1180 | actor.Size = m_shape.Scale; | 1180 | actor.Size = m_shape.Scale; |
1181 | 1181 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); | |
1182 | // if (Shape.SculptEntry) | ||
1183 | // CheckSculptAndLoad(); | ||
1184 | // else | ||
1185 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); | ||
1186 | } | 1182 | } |
1187 | } | 1183 | } |
1188 | } | 1184 | } |