aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs171
1 files changed, 88 insertions, 83 deletions
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}