diff options
author | UbitUmarov | 2016-08-07 14:30:27 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-07 21:13:01 +0100 |
commit | ff0ccf9c67e3840c39729e1ce9677b96e0cfd472 (patch) | |
tree | 6288879780f7df9bd5198c13e71f753df56af1af | |
parent | if a viewer overloads region capability to process RequestMapBlocks, ignore ... (diff) | |
download | opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.zip opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.gz opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.bz2 opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.xz |
several changes related to culling option
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 52 | ||||
-rw-r--r-- | OpenSim/Framework/PriorityQueue.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 188 |
3 files changed, 116 insertions, 136 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 018f194..0140733 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -585,10 +585,10 @@ namespace OpenSim.Framework | |||
585 | public float dwell; | 585 | public float dwell; |
586 | } | 586 | } |
587 | 587 | ||
588 | public class IEntityUpdate | 588 | public class EntityUpdate |
589 | { | 589 | { |
590 | private ISceneEntity m_entity; | 590 | private ISceneEntity m_entity; |
591 | private uint m_flags; | 591 | private PrimUpdateFlags m_flags; |
592 | private int m_updateTime; | 592 | private int m_updateTime; |
593 | 593 | ||
594 | public ISceneEntity Entity | 594 | public ISceneEntity Entity |
@@ -596,7 +596,7 @@ namespace OpenSim.Framework | |||
596 | get { return m_entity; } | 596 | get { return m_entity; } |
597 | } | 597 | } |
598 | 598 | ||
599 | public uint Flags | 599 | public PrimUpdateFlags Flags |
600 | { | 600 | { |
601 | get { return m_flags; } | 601 | get { return m_flags; } |
602 | } | 602 | } |
@@ -606,23 +606,31 @@ namespace OpenSim.Framework | |||
606 | get { return m_updateTime; } | 606 | get { return m_updateTime; } |
607 | } | 607 | } |
608 | 608 | ||
609 | public virtual void Update(IEntityUpdate update) | 609 | public virtual void Update(EntityUpdate update) |
610 | { | 610 | { |
611 | m_flags |= update.Flags; | 611 | PrimUpdateFlags updateFlags = update.Flags; |
612 | if(updateFlags.HasFlag(PrimUpdateFlags.CancelKill)) | ||
613 | m_flags = PrimUpdateFlags.FullUpdate; | ||
614 | else if(m_flags.HasFlag(PrimUpdateFlags.Kill)) | ||
615 | return; | ||
616 | else if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) | ||
617 | m_flags = PrimUpdateFlags.Kill; | ||
618 | else | ||
619 | m_flags |= updateFlags; | ||
612 | 620 | ||
613 | // Use the older of the updates as the updateTime | 621 | // Use the older of the updates as the updateTime |
614 | if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) | 622 | if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) |
615 | m_updateTime = update.UpdateTime; | 623 | m_updateTime = update.UpdateTime; |
616 | } | 624 | } |
617 | 625 | ||
618 | public IEntityUpdate(ISceneEntity entity, uint flags) | 626 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) |
619 | { | 627 | { |
620 | m_entity = entity; | 628 | m_entity = entity; |
621 | m_flags = flags; | 629 | m_flags = flags; |
622 | m_updateTime = Util.EnvironmentTickCount(); | 630 | m_updateTime = Util.EnvironmentTickCount(); |
623 | } | 631 | } |
624 | 632 | ||
625 | public IEntityUpdate(ISceneEntity entity, uint flags, Int32 updateTime) | 633 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, Int32 updateTime) |
626 | { | 634 | { |
627 | m_entity = entity; | 635 | m_entity = entity; |
628 | m_flags = flags; | 636 | m_flags = flags; |
@@ -630,29 +638,6 @@ namespace OpenSim.Framework | |||
630 | } | 638 | } |
631 | } | 639 | } |
632 | 640 | ||
633 | public class EntityUpdate : IEntityUpdate | ||
634 | { | ||
635 | private float m_timeDilation; | ||
636 | |||
637 | public float TimeDilation | ||
638 | { | ||
639 | get { return m_timeDilation; } | ||
640 | } | ||
641 | |||
642 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation) | ||
643 | : base(entity, (uint)flags) | ||
644 | { | ||
645 | // Flags = flags; | ||
646 | m_timeDilation = timedilation; | ||
647 | } | ||
648 | |||
649 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime) | ||
650 | : base(entity,(uint)flags,updateTime) | ||
651 | { | ||
652 | m_timeDilation = timedilation; | ||
653 | } | ||
654 | } | ||
655 | |||
656 | public class PlacesReplyData | 641 | public class PlacesReplyData |
657 | { | 642 | { |
658 | public UUID OwnerID; | 643 | public UUID OwnerID; |
@@ -701,9 +686,12 @@ namespace OpenSim.Framework | |||
701 | ExtraData = 1 << 20, | 686 | ExtraData = 1 << 20, |
702 | Sound = 1 << 21, | 687 | Sound = 1 << 21, |
703 | Joint = 1 << 22, | 688 | Joint = 1 << 22, |
704 | FullUpdate = UInt32.MaxValue | 689 | FullUpdate = 0x3fffffff, |
690 | CancelKill = 0x7fffffff, | ||
691 | Kill = 0x80000000 | ||
705 | } | 692 | } |
706 | 693 | ||
694 | /* included in .net 4.0 | ||
707 | public static class PrimUpdateFlagsExtensions | 695 | public static class PrimUpdateFlagsExtensions |
708 | { | 696 | { |
709 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) | 697 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) |
@@ -711,7 +699,7 @@ namespace OpenSim.Framework | |||
711 | return (updateFlags & flag) == flag; | 699 | return (updateFlags & flag) == flag; |
712 | } | 700 | } |
713 | } | 701 | } |
714 | 702 | */ | |
715 | public interface IClientAPI | 703 | public interface IClientAPI |
716 | { | 704 | { |
717 | Vector3 StartPos { get; set; } | 705 | Vector3 StartPos { get; set; } |
diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs index 4f05f65..fec01da 100644 --- a/OpenSim/Framework/PriorityQueue.cs +++ b/OpenSim/Framework/PriorityQueue.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Framework | |||
113 | /// <summary> | 113 | /// <summary> |
114 | /// Enqueue an item into the specified priority queue | 114 | /// Enqueue an item into the specified priority queue |
115 | /// </summary> | 115 | /// </summary> |
116 | public bool Enqueue(uint pqueue, IEntityUpdate value) | 116 | public bool Enqueue(uint pqueue, EntityUpdate value) |
117 | { | 117 | { |
118 | LookupItem lookup; | 118 | LookupItem lookup; |
119 | 119 | ||
@@ -154,7 +154,7 @@ namespace OpenSim.Framework | |||
154 | /// oldest item from the next queue in order to provide fair access to | 154 | /// oldest item from the next queue in order to provide fair access to |
155 | /// all of the queues | 155 | /// all of the queues |
156 | /// </summary> | 156 | /// </summary> |
157 | public bool TryDequeue(out IEntityUpdate value, out Int32 timeinqueue) | 157 | public bool TryDequeue(out EntityUpdate value, out Int32 timeinqueue) |
158 | { | 158 | { |
159 | // If there is anything in imediate queues, return it first no | 159 | // If there is anything in imediate queues, return it first no |
160 | // matter what else. Breaks fairness. But very useful. | 160 | // matter what else. Breaks fairness. But very useful. |
@@ -212,7 +212,7 @@ namespace OpenSim.Framework | |||
212 | } | 212 | } |
213 | 213 | ||
214 | timeinqueue = 0; | 214 | timeinqueue = 0; |
215 | value = default(IEntityUpdate); | 215 | value = default(EntityUpdate); |
216 | return false; | 216 | return false; |
217 | } | 217 | } |
218 | 218 | ||
@@ -270,8 +270,8 @@ namespace OpenSim.Framework | |||
270 | #region MinHeapItem | 270 | #region MinHeapItem |
271 | private struct MinHeapItem : IComparable<MinHeapItem> | 271 | private struct MinHeapItem : IComparable<MinHeapItem> |
272 | { | 272 | { |
273 | private IEntityUpdate value; | 273 | private EntityUpdate value; |
274 | internal IEntityUpdate Value { | 274 | internal EntityUpdate Value { |
275 | get { | 275 | get { |
276 | return this.value; | 276 | return this.value; |
277 | } | 277 | } |
@@ -307,7 +307,7 @@ namespace OpenSim.Framework | |||
307 | this.pqueue = pqueue; | 307 | this.pqueue = pqueue; |
308 | } | 308 | } |
309 | 309 | ||
310 | internal MinHeapItem(uint pqueue, UInt64 entryorder, IEntityUpdate value) | 310 | internal MinHeapItem(uint pqueue, UInt64 entryorder, EntityUpdate value) |
311 | { | 311 | { |
312 | this.entrytime = Util.EnvironmentTickCount(); | 312 | this.entrytime = Util.EnvironmentTickCount(); |
313 | this.entryorder = entryorder; | 313 | this.entryorder = entryorder; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e3b2fd1..b823abe 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3937,7 +3937,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3937 | uint priority = m_prioritizer.GetUpdatePriority(this, entity); | 3937 | uint priority = m_prioritizer.GetUpdatePriority(this, entity); |
3938 | 3938 | ||
3939 | lock (m_entityUpdates.SyncRoot) | 3939 | lock (m_entityUpdates.SyncRoot) |
3940 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); | 3940 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags)); |
3941 | } | 3941 | } |
3942 | 3942 | ||
3943 | /// <summary> | 3943 | /// <summary> |
@@ -4006,12 +4006,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4006 | // We must lock for both manipulating the kill record and sending the packet, in order to avoid a race | 4006 | // We must lock for both manipulating the kill record and sending the packet, in order to avoid a race |
4007 | // condition where a kill can be processed before an out-of-date update for the same object. | 4007 | // condition where a kill can be processed before an out-of-date update for the same object. |
4008 | // float avgTimeDilation = 0.0f; | 4008 | // float avgTimeDilation = 0.0f; |
4009 | IEntityUpdate iupdate; | 4009 | EntityUpdate update; |
4010 | Int32 timeinqueue; // this is just debugging code & can be dropped later | 4010 | Int32 timeinqueue; // this is just debugging code & can be dropped later |
4011 | 4011 | ||
4012 | bool doCulling = m_scene.ObjectsCullingByDistance; | 4012 | bool doCulling = m_scene.ObjectsCullingByDistance; |
4013 | float cullingrange = 64.0f; | 4013 | float cullingrange = 64.0f; |
4014 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); | 4014 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); |
4015 | List<SceneObjectGroup> kills = new List<SceneObjectGroup>(); | ||
4015 | // Vector3 mycamera = Vector3.Zero; | 4016 | // Vector3 mycamera = Vector3.Zero; |
4016 | Vector3 mypos = Vector3.Zero; | 4017 | Vector3 mypos = Vector3.Zero; |
4017 | ScenePresence mysp = (ScenePresence)SceneAgent; | 4018 | ScenePresence mysp = (ScenePresence)SceneAgent; |
@@ -4027,12 +4028,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4027 | while (updatesThisCall < maxUpdates) | 4028 | while (updatesThisCall < maxUpdates) |
4028 | { | 4029 | { |
4029 | lock (m_entityUpdates.SyncRoot) | 4030 | lock (m_entityUpdates.SyncRoot) |
4030 | if (!m_entityUpdates.TryDequeue(out iupdate, out timeinqueue)) | 4031 | if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) |
4031 | break; | 4032 | break; |
4032 | 4033 | ||
4033 | EntityUpdate update = (EntityUpdate)iupdate; | ||
4034 | |||
4035 | // avgTimeDilation += update.TimeDilation; | 4034 | // avgTimeDilation += update.TimeDilation; |
4035 | PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; | ||
4036 | |||
4037 | if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) | ||
4038 | { | ||
4039 | m_killRecord.Add(update.Entity.LocalId); | ||
4040 | continue; | ||
4041 | } | ||
4036 | 4042 | ||
4037 | if (update.Entity is SceneObjectPart) | 4043 | if (update.Entity is SceneObjectPart) |
4038 | { | 4044 | { |
@@ -4156,11 +4162,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4156 | 4162 | ||
4157 | #region UpdateFlags to packet type conversion | 4163 | #region UpdateFlags to packet type conversion |
4158 | 4164 | ||
4159 | PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; | ||
4160 | |||
4161 | bool canUseCompressed = true; | 4165 | bool canUseCompressed = true; |
4162 | bool canUseImproved = true; | 4166 | bool canUseImproved = true; |
4163 | 4167 | ||
4168 | |||
4164 | // Compressed object updates only make sense for LL primitives | 4169 | // Compressed object updates only make sense for LL primitives |
4165 | if (!(update.Entity is SceneObjectPart)) | 4170 | if (!(update.Entity is SceneObjectPart)) |
4166 | { | 4171 | { |
@@ -4319,17 +4324,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4319 | m_killRecord.Clear(); | 4324 | m_killRecord.Clear(); |
4320 | } | 4325 | } |
4321 | 4326 | ||
4327 | if (kills.Count > 0) | ||
4328 | { | ||
4329 | foreach(SceneObjectGroup grp in kills) | ||
4330 | { | ||
4331 | foreach(SceneObjectPart p in grp.Parts) | ||
4332 | SendEntityUpdate(p,PrimUpdateFlags.Kill); | ||
4333 | } | ||
4334 | kills.Clear(); | ||
4335 | } | ||
4336 | |||
4322 | if(GroupsNeedFullUpdate.Count > 0) | 4337 | if(GroupsNeedFullUpdate.Count > 0) |
4323 | { | 4338 | { |
4324 | foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) | 4339 | foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) |
4325 | { | 4340 | { |
4326 | grp.ScheduleGroupForFullUpdate(); | 4341 | foreach(SceneObjectPart p in grp.Parts) |
4342 | SendEntityUpdate(p,PrimUpdateFlags.CancelKill); | ||
4327 | lock(GroupsInView) | 4343 | lock(GroupsInView) |
4328 | GroupsInView.Add(grp); | 4344 | GroupsInView.Add(grp); |
4329 | } | 4345 | } |
4330 | } | 4346 | } |
4331 | #endregion | 4347 | #endregion |
4332 | |||
4333 | } | 4348 | } |
4334 | 4349 | ||
4335 | // hack.. dont use | 4350 | // hack.. dont use |
@@ -4368,7 +4383,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4368 | } | 4383 | } |
4369 | 4384 | ||
4370 | private bool CheckGroupsInViewBusy = false; | 4385 | private bool CheckGroupsInViewBusy = false; |
4371 | private bool CheckGroupsInViewOverRun = false; | ||
4372 | 4386 | ||
4373 | public void CheckGroupsInView() | 4387 | public void CheckGroupsInView() |
4374 | { | 4388 | { |
@@ -4377,112 +4391,90 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4377 | return; | 4391 | return; |
4378 | 4392 | ||
4379 | if(CheckGroupsInViewBusy) | 4393 | if(CheckGroupsInViewBusy) |
4380 | { | ||
4381 | CheckGroupsInViewOverRun = true; | ||
4382 | return; | 4394 | return; |
4383 | } | 4395 | |
4384 | CheckGroupsInViewBusy = true; | 4396 | CheckGroupsInViewBusy = true; |
4385 | do | ||
4386 | { | ||
4387 | CheckGroupsInViewOverRun = false; | ||
4388 | 4397 | ||
4389 | float cullingrange = 64.0f; | 4398 | float cullingrange = 64.0f; |
4390 | // Vector3 mycamera = Vector3.Zero; | 4399 | // Vector3 mycamera = Vector3.Zero; |
4391 | Vector3 mypos = Vector3.Zero; | 4400 | Vector3 mypos = Vector3.Zero; |
4392 | ScenePresence mysp = (ScenePresence)SceneAgent; | 4401 | ScenePresence mysp = (ScenePresence)SceneAgent; |
4393 | if(mysp != null && !mysp.IsDeleted) | 4402 | if(mysp != null && !mysp.IsDeleted) |
4394 | { | 4403 | { |
4395 | cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f; | 4404 | cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f; |
4396 | // mycamera = mysp.CameraPosition; | 4405 | // mycamera = mysp.CameraPosition; |
4397 | mypos = mysp.AbsolutePosition; | 4406 | mypos = mysp.AbsolutePosition; |
4398 | } | 4407 | } |
4399 | else | 4408 | else |
4400 | { | 4409 | { |
4401 | CheckGroupsInViewBusy= false; | 4410 | CheckGroupsInViewBusy= false; |
4402 | return; | 4411 | return; |
4403 | } | 4412 | } |
4404 | 4413 | ||
4405 | HashSet<SceneObjectGroup> NewGroupsInView = new HashSet<SceneObjectGroup>(); | 4414 | HashSet<SceneObjectGroup> NewGroupsInView = new HashSet<SceneObjectGroup>(); |
4406 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); | 4415 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); |
4407 | List<uint> kills = new List<uint>(); | 4416 | List<SceneObjectGroup> kills = new List<SceneObjectGroup>(); |
4408 | int killedParst = 0; | ||
4409 | 4417 | ||
4410 | EntityBase[] entities = m_scene.Entities.GetEntities(); | 4418 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
4411 | foreach (EntityBase e in entities) | 4419 | foreach (EntityBase e in entities) |
4412 | { | 4420 | { |
4413 | if(!IsActive) | 4421 | if(!IsActive) |
4414 | return; | 4422 | return; |
4415 | 4423 | ||
4416 | if (e != null && e is SceneObjectGroup) | 4424 | if (e != null && e is SceneObjectGroup) |
4417 | { | 4425 | { |
4418 | SceneObjectGroup grp = (SceneObjectGroup)e; | 4426 | SceneObjectGroup grp = (SceneObjectGroup)e; |
4419 | if(grp.IsDeleted || grp.IsAttachment) | 4427 | if(grp.IsDeleted || grp.IsAttachment) |
4420 | continue; | 4428 | continue; |
4421 | 4429 | ||
4422 | float bradius = grp.GetBoundsRadius(); | 4430 | float bradius = grp.GetBoundsRadius(); |
4423 | Vector3 grppos = grp.AbsolutePosition + grp.getBoundsCenter(); | 4431 | Vector3 grppos = grp.AbsolutePosition + grp.getBoundsCenter(); |
4424 | // float dcam = (grppos - mycamera).LengthSquared(); | 4432 | // float dcam = (grppos - mycamera).LengthSquared(); |
4425 | float dpos = (grppos - mypos).LengthSquared(); | 4433 | float dpos = (grppos - mypos).LengthSquared(); |
4426 | // if(dcam < dpos) | 4434 | // if(dcam < dpos) |
4427 | // dpos = dcam; | 4435 | // dpos = dcam; |
4428 | 4436 | ||
4429 | dpos = (float)Math.Sqrt(dpos) - bradius; | 4437 | dpos = (float)Math.Sqrt(dpos) - bradius; |
4430 | 4438 | ||
4431 | bool inview; | 4439 | bool inview; |
4432 | lock(GroupsInView) | 4440 | lock(GroupsInView) |
4433 | inview = GroupsInView.Contains(grp); | 4441 | inview = GroupsInView.Contains(grp); |
4434 | |||
4435 | if(dpos > cullingrange) | ||
4436 | { | ||
4437 | if(inview) | ||
4438 | { | ||
4439 | kills.Add(grp.LocalId); | ||
4440 | killedParst += grp.PrimCount; | ||
4441 | 4442 | ||
4442 | if (killedParst > 199 ) | 4443 | if(dpos > cullingrange) |
4443 | { | 4444 | { |
4444 | SendKillObject(kills); | 4445 | if(inview) |
4445 | kills.Clear(); | 4446 | kills.Add(grp); |
4446 | killedParst = 0; | 4447 | } |
4447 | Thread.Sleep(50); | 4448 | else |
4448 | if(mysp != null && !mysp.IsDeleted) | 4449 | { |
4449 | { | 4450 | if(!inview) |
4450 | cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f; | 4451 | GroupsNeedFullUpdate.Add(grp); |
4451 | // mycamera = mysp.CameraPosition; | 4452 | NewGroupsInView.Add(grp); |
4452 | mypos = mysp.AbsolutePosition; | ||
4453 | } | ||
4454 | else | ||
4455 | { | ||
4456 | CheckGroupsInViewBusy= false; | ||
4457 | return; | ||
4458 | } | ||
4459 | } | ||
4460 | } | ||
4461 | } | ||
4462 | else | ||
4463 | { | ||
4464 | if(!inview) | ||
4465 | GroupsNeedFullUpdate.Add(grp); | ||
4466 | NewGroupsInView.Add(grp); | ||
4467 | } | ||
4468 | } | 4453 | } |
4469 | } | 4454 | } |
4455 | } | ||
4470 | 4456 | ||
4471 | lock(GroupsInView) | 4457 | lock(GroupsInView) |
4472 | GroupsInView = NewGroupsInView; | 4458 | GroupsInView = NewGroupsInView; |
4473 | 4459 | ||
4474 | if (kills.Count > 0) | 4460 | if (kills.Count > 0) |
4461 | { | ||
4462 | foreach(SceneObjectGroup grp in kills) | ||
4475 | { | 4463 | { |
4476 | SendKillObject(kills); | 4464 | foreach(SceneObjectPart p in grp.Parts) |
4477 | kills.Clear(); | 4465 | SendEntityUpdate(p,PrimUpdateFlags.Kill); |
4478 | } | 4466 | } |
4467 | kills.Clear(); | ||
4468 | } | ||
4479 | 4469 | ||
4480 | if(GroupsNeedFullUpdate.Count > 0) | 4470 | if(GroupsNeedFullUpdate.Count > 0) |
4471 | { | ||
4472 | foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) | ||
4481 | { | 4473 | { |
4482 | foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) | 4474 | foreach(SceneObjectPart p in grp.Parts) |
4483 | grp.ScheduleGroupForFullUpdate(); | 4475 | SendEntityUpdate(p,PrimUpdateFlags.CancelKill); |
4484 | } | 4476 | } |
4485 | } while(CheckGroupsInViewOverRun); | 4477 | } |
4486 | 4478 | ||
4487 | CheckGroupsInViewBusy = false; | 4479 | CheckGroupsInViewBusy = false; |
4488 | } | 4480 | } |
@@ -4670,13 +4662,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4670 | OutPacket(pack, ThrottleOutPacketType.Task); | 4662 | OutPacket(pack, ThrottleOutPacketType.Task); |
4671 | } | 4663 | } |
4672 | 4664 | ||
4673 | private class ObjectPropertyUpdate : IEntityUpdate | 4665 | private class ObjectPropertyUpdate : EntityUpdate |
4674 | { | 4666 | { |
4675 | internal bool SendFamilyProps; | 4667 | internal bool SendFamilyProps; |
4676 | internal bool SendObjectProps; | 4668 | internal bool SendObjectProps; |
4677 | 4669 | ||
4678 | public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj) | 4670 | public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj) |
4679 | : base(entity,flags) | 4671 | : base(entity,(PrimUpdateFlags)flags) |
4680 | { | 4672 | { |
4681 | SendFamilyProps = sendfam; | 4673 | SendFamilyProps = sendfam; |
4682 | SendObjectProps = sendobj; | 4674 | SendObjectProps = sendobj; |
@@ -4745,7 +4737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4745 | OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = | 4737 | OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = |
4746 | new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); | 4738 | new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); |
4747 | 4739 | ||
4748 | IEntityUpdate iupdate; | 4740 | EntityUpdate iupdate; |
4749 | Int32 timeinqueue; // this is just debugging code & can be dropped later | 4741 | Int32 timeinqueue; // this is just debugging code & can be dropped later |
4750 | 4742 | ||
4751 | int updatesThisCall = 0; | 4743 | int updatesThisCall = 0; |
@@ -4849,11 +4841,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4849 | // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt); | 4841 | // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt); |
4850 | } | 4842 | } |
4851 | 4843 | ||
4852 | private ObjectPropertiesFamilyPacket.ObjectDataBlock CreateObjectPropertiesFamilyBlock(SceneObjectPart sop, uint requestFlags) | 4844 | private ObjectPropertiesFamilyPacket.ObjectDataBlock CreateObjectPropertiesFamilyBlock(SceneObjectPart sop, PrimUpdateFlags requestFlags) |
4853 | { | 4845 | { |
4854 | ObjectPropertiesFamilyPacket.ObjectDataBlock block = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); | 4846 | ObjectPropertiesFamilyPacket.ObjectDataBlock block = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); |
4855 | 4847 | ||
4856 | block.RequestFlags = requestFlags; | 4848 | block.RequestFlags = (uint)requestFlags; |
4857 | block.ObjectID = sop.UUID; | 4849 | block.ObjectID = sop.UUID; |
4858 | if (sop.OwnerID == sop.GroupID) | 4850 | if (sop.OwnerID == sop.GroupID) |
4859 | block.OwnerID = UUID.Zero; | 4851 | block.OwnerID = UUID.Zero; |