aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/IClientAPI.cs4
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs171
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs19
4 files changed, 110 insertions, 92 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index e94b9aa..0068761 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -211,9 +211,9 @@ namespace OpenSim.Framework
211 211
212 public delegate void GenericCall7(uint localID, string message); 212 public delegate void GenericCall7(uint localID, string message);
213 213
214 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); 214 public delegate void UpdateShape(LLUUID agentID, uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
215 215
216 public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data); 216 public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data);
217 217
218 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); 218 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
219 219
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index f9c1ff1..8b93c5f 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -2014,116 +2014,121 @@ namespace OpenSim.Region.ClientStack
2014 { 2014 {
2015 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet; 2015 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet;
2016 // System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); 2016 // System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
2017 OpenSim.Region.Environment.Scenes.Scene tScene = (OpenSim.Region.Environment.Scenes.Scene)this.m_scene;
2018
2017 for (int i = 0; i < multipleupdate.ObjectData.Length; i++) 2019 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
2018 { 2020 {
2019 #region position 2021 if (tScene.PermissionsMngr.CanEditObject(simClient.AgentId, tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID))
2020
2021 if (multipleupdate.ObjectData[i].Type == 9) //change position
2022 { 2022 {
2023 if (OnUpdatePrimGroupPosition != null) 2023 #region position
2024
2025 if (multipleupdate.ObjectData[i].Type == 9) //change position
2024 { 2026 {
2025 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2027 if (OnUpdatePrimGroupPosition != null)
2026 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2028 {
2029 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2030 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2031 }
2027 } 2032 }
2028 } 2033 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
2029 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
2030 {
2031 if (OnUpdatePrimSinglePosition != null)
2032 { 2034 {
2033 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2035 if (OnUpdatePrimSinglePosition != null)
2034 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2036 {
2035 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2037 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2038 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2039 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2040 }
2036 } 2041 }
2037 }
2038 #endregion position 2042 #endregion position
2039 #region rotation 2043 #region rotation
2040 2044
2041 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab 2045 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab
2042 {
2043 if (OnUpdatePrimSingleRotation != null)
2044 { 2046 {
2045 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 2047 if (OnUpdatePrimSingleRotation != null)
2046 //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2048 {
2047 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2049 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
2050 //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2051 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2052 }
2048 } 2053 }
2049 } 2054 else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
2050 else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
2051 {
2052 if (OnUpdatePrimSingleRotation != null)
2053 { 2055 {
2054 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2056 if (OnUpdatePrimSingleRotation != null)
2055 //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2057 {
2056 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2058 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2059 //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2060 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2061 }
2057 } 2062 }
2058 } 2063 else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
2059 else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
2060 {
2061 if (OnUpdatePrimGroupRotation != null)
2062 { 2064 {
2063 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 2065 if (OnUpdatePrimGroupRotation != null)
2064 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2066 {
2065 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2067 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
2068 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2069 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2070 }
2066 } 2071 }
2067 } 2072 else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
2068 else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
2069 {
2070 if (OnUpdatePrimGroupMouseRotation != null)
2071 { 2073 {
2072 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2074 if (OnUpdatePrimGroupMouseRotation != null)
2073 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2075 {
2074 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2076 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2075 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2077 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2076 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); 2078 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2079 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2080 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
2081 }
2077 } 2082 }
2078 }
2079 #endregion 2083 #endregion
2080 #region scale 2084 #region scale
2081 2085
2082 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab 2086 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab
2083 {
2084 if (OnUpdatePrimScale != null)
2085 { 2087 {
2086 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2088 if (OnUpdatePrimScale != null)
2087 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2089 {
2088 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2090 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2089 2091 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2090 // Change the position based on scale (for bug number 246) 2092 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2091 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2093
2092 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2094 // Change the position based on scale (for bug number 246)
2093 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2095 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2096 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2097 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2098 }
2094 } 2099 }
2095 } 2100 else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
2096 else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
2097 {
2098 if (OnUpdatePrimScale != null)
2099 { 2101 {
2100 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2102 if (OnUpdatePrimScale != null)
2101 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); 2103 {
2102 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2104 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2103 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2105 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
2104 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2106 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2107 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2108 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2109 }
2105 } 2110 }
2106 } 2111 else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
2107 else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
2108 {
2109 if (OnUpdatePrimScale != null)
2110 { 2112 {
2111 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2113 if (OnUpdatePrimScale != null)
2112 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2114 {
2113 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2115 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2116 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2117 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2118 }
2114 } 2119 }
2115 } 2120 else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
2116 else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
2117 {
2118 if (OnUpdatePrimScale != null)
2119 { 2121 {
2120 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2122 if (OnUpdatePrimScale != null)
2121 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2123 {
2122 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2124 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2125 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2126 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2127 }
2123 } 2128 }
2124 }
2125 2129
2126 #endregion 2130 #endregion
2131 }
2127 } 2132 }
2128 return true; 2133 return true;
2129 } 2134 }
@@ -2757,7 +2762,7 @@ namespace OpenSim.Region.ClientStack
2757 { 2762 {
2758 if (OnUpdatePrimShape != null) 2763 if (OnUpdatePrimShape != null)
2759 { 2764 {
2760 OnUpdatePrimShape(shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]); 2765 OnUpdatePrimShape(this.m_agentId, shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]);
2761 } 2766 }
2762 } 2767 }
2763 break; 2768 break;
@@ -2765,7 +2770,7 @@ namespace OpenSim.Region.ClientStack
2765 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack; 2770 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack;
2766 if (OnUpdateExtraParams != null) 2771 if (OnUpdateExtraParams != null)
2767 { 2772 {
2768 OnUpdateExtraParams(extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType, 2773 OnUpdateExtraParams(this.m_agentId, extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType,
2769 extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData); 2774 extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData);
2770 } 2775 }
2771 break; 2776 break;
@@ -3642,4 +3647,4 @@ namespace OpenSim.Region.ClientStack
3642 OutPacket(logReply, ThrottleOutPacketType.Task); 3647 OutPacket(logReply, ThrottleOutPacketType.Task);
3643 } 3648 }
3644 } 3649 }
3645} \ No newline at end of file 3650}
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 6efa116..bcaa1bf 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -103,6 +103,12 @@ namespace OpenSim.Region.Environment
103 103
104 string reason = "Insufficient permission"; 104 string reason = "Insufficient permission";
105 105
106 Land land = this.m_scene.LandManager.getLandObject(position.X, position.Y);
107 if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) == (int)Parcel.ParcelFlags.CreateObjects)
108 permission = true;
109
110 //TODO: check for group rights
111
106 if (IsAdministrator(user)) 112 if (IsAdministrator(user))
107 { 113 {
108 permission = true; 114 permission = true;
@@ -361,4 +367,4 @@ namespace OpenSim.Region.Environment
361 367
362 #endregion 368 #endregion
363 } 369 }
364} \ No newline at end of file 370}
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index c1acde4..0cb17c0 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -589,11 +589,14 @@ namespace OpenSim.Region.Environment.Scenes
589 group.SetPartDescription(description, primLocalID); 589 group.SetPartDescription(description, primLocalID);
590 } 590 }
591 591
592 public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data) 592 public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data)
593 { 593 {
594 SceneObjectGroup group = GetGroupByPrim(primLocalID); 594 SceneObjectGroup group = GetGroupByPrim(primLocalID);
595 if (group != null) 595 if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID)))
596 group.UpdateExtraParam(primLocalID, type, inUse, data); 596 {
597 if (group != null)
598 group.UpdateExtraParam(primLocalID, type, inUse, data);
599 }
597 } 600 }
598 601
599 /// <summary> 602 /// <summary>
@@ -601,11 +604,14 @@ namespace OpenSim.Region.Environment.Scenes
601 /// </summary> 604 /// </summary>
602 /// <param name="primLocalID"></param> 605 /// <param name="primLocalID"></param>
603 /// <param name="shapeBlock"></param> 606 /// <param name="shapeBlock"></param>
604 public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) 607 public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
605 { 608 {
606 SceneObjectGroup group = GetGroupByPrim(primLocalID); 609 SceneObjectGroup group = GetGroupByPrim(primLocalID);
607 if (group != null) 610 if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID)))
608 group.UpdateShape(shapeBlock, primLocalID); 611 {
612 if (group != null)
613 group.UpdateShape(shapeBlock, primLocalID);
614 }
609 } 615 }
610 616
611 /// <summary> 617 /// <summary>
@@ -753,3 +759,4 @@ namespace OpenSim.Region.Environment.Scenes
753 } 759 }
754} 760}
755 761
762