aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2017-01-11 01:02:57 +0000
committerUbitUmarov2017-01-11 01:02:57 +0000
commite0ab0b3b6b8ae45ff74c274d5af89ccc9bdb5566 (patch)
tree32da77273f13f5e1511b2b31344f18585deecff0 /OpenSim/Region/ClientStack
parentremove obsolete PrimFlags.ObjectYouOfficer; rearrange GenerateClientFlags(...... (diff)
downloadopensim-SC_OLD-e0ab0b3b6b8ae45ff74c274d5af89ccc9bdb5566.zip
opensim-SC_OLD-e0ab0b3b6b8ae45ff74c274d5af89ccc9bdb5566.tar.gz
opensim-SC_OLD-e0ab0b3b6b8ae45ff74c274d5af89ccc9bdb5566.tar.bz2
opensim-SC_OLD-e0ab0b3b6b8ae45ff74c274d5af89ccc9bdb5566.tar.xz
change GenerateClientFlags(...) to work with a scenepresence; make use of the new IsGod to check its God rights; remove the non standard estate manager right to move other ppl prims i added on last commits; coment out a test method i added sometime ago
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs23
1 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index df34668..8ba1ba3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4126,14 +4126,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4126// Vector3 mycamera = Vector3.Zero; 4126// Vector3 mycamera = Vector3.Zero;
4127 Vector3 mypos = Vector3.Zero; 4127 Vector3 mypos = Vector3.Zero;
4128 ScenePresence mysp = (ScenePresence)SceneAgent; 4128 ScenePresence mysp = (ScenePresence)SceneAgent;
4129 if(mysp != null && !mysp.IsDeleted) 4129
4130 // we should have a presence
4131 if(mysp == null)
4132 return;
4133
4134 if(doCulling)
4130 { 4135 {
4131 cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f; 4136 cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f;
4132// mycamera = mysp.CameraPosition; 4137// mycamera = mysp.CameraPosition;
4133 mypos = mysp.AbsolutePosition; 4138 mypos = mysp.AbsolutePosition;
4134 } 4139 }
4135 else
4136 doCulling = false;
4137 4140
4138 while (maxUpdatesBytes > 0) 4141 while (maxUpdatesBytes > 0)
4139 { 4142 {
@@ -4330,7 +4333,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4330 if (update.Entity is ScenePresence) 4333 if (update.Entity is ScenePresence)
4331 ablock = CreateAvatarUpdateBlock((ScenePresence)update.Entity); 4334 ablock = CreateAvatarUpdateBlock((ScenePresence)update.Entity);
4332 else 4335 else
4333 ablock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId); 4336 ablock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, mysp);
4334 objectUpdateBlocks.Add(ablock); 4337 objectUpdateBlocks.Add(ablock);
4335 objectUpdates.Value.Add(update); 4338 objectUpdates.Value.Add(update);
4336 maxUpdatesBytes -= ablock.Length; 4339 maxUpdatesBytes -= ablock.Length;
@@ -4462,6 +4465,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4462 } 4465 }
4463 4466
4464 // hack.. dont use 4467 // hack.. dont use
4468/*
4465 public void SendPartFullUpdate(ISceneEntity ent, uint? parentID) 4469 public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
4466 { 4470 {
4467 if (ent is SceneObjectPart) 4471 if (ent is SceneObjectPart)
@@ -4472,7 +4476,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4472 packet.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 4476 packet.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
4473 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 4477 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
4474 4478
4475 ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, this.m_agentId); 4479 ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, mysp);
4476 if (parentID.HasValue) 4480 if (parentID.HasValue)
4477 { 4481 {
4478 blk.ParentID = parentID.Value; 4482 blk.ParentID = parentID.Value;
@@ -4488,7 +4492,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); 4492// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name);
4489// 4493//
4490 } 4494 }
4491 4495*/
4492 public void ReprioritizeUpdates() 4496 public void ReprioritizeUpdates()
4493 { 4497 {
4494 lock (m_entityUpdates.SyncRoot) 4498 lock (m_entityUpdates.SyncRoot)
@@ -5726,7 +5730,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5726 return update; 5730 return update;
5727 } 5731 }
5728 5732
5729 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID) 5733// protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID)
5734 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, ScenePresence sp)
5730 { 5735 {
5731 byte[] objectData = new byte[60]; 5736 byte[] objectData = new byte[60];
5732 data.RelativePosition.ToBytes(objectData, 0); 5737 data.RelativePosition.ToBytes(objectData, 0);
@@ -5826,12 +5831,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5826 5831
5827 #region PrimFlags 5832 #region PrimFlags
5828 5833
5829 PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(recipientID, data.UUID); 5834 PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(sp, data.UUID);
5830 5835
5831 // Don't send the CreateSelected flag to everyone 5836 // Don't send the CreateSelected flag to everyone
5832 flags &= ~PrimFlags.CreateSelected; 5837 flags &= ~PrimFlags.CreateSelected;
5833 5838
5834 if (recipientID == data.OwnerID) 5839 if (sp.UUID == data.OwnerID)
5835 { 5840 {
5836 if (data.CreateSelected) 5841 if (data.CreateSelected)
5837 { 5842 {