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.cs182
1 files changed, 96 insertions, 86 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 823214a..45806ff 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -1999,118 +1999,128 @@ namespace OpenSim.Region.ClientStack
1999 { 1999 {
2000 // Can't act on Null Data 2000 // Can't act on Null Data
2001 if (multipleupdate.ObjectData[i].Data != null) 2001 if (multipleupdate.ObjectData[i].Data != null)
2002 { 2002 {
2003 if (tScene.PermissionsMngr.CanEditObjectPosition(simClient.AgentId, tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID)) 2003 LLUUID editobj = tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID;
2004 if (editobj != null)
2004 { 2005 {
2005 #region position 2006 if (tScene.PermissionsMngr.CanEditObjectPosition(simClient.AgentId, editobj))
2006
2007 if (multipleupdate.ObjectData[i].Type == 9) //change position
2008 { 2007 {
2009 if (OnUpdatePrimGroupPosition != null) 2008 #region position
2009
2010 if (multipleupdate.ObjectData[i].Type == 9) //change position
2010 { 2011 {
2011 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2012 if (OnUpdatePrimGroupPosition != null)
2012 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2013 {
2014 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2015 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2016 }
2013 } 2017 }
2014 } 2018 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
2015 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
2016 {
2017 if (OnUpdatePrimSinglePosition != null)
2018 { 2019 {
2019 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2020 if (OnUpdatePrimSinglePosition != null)
2020 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2021 {
2021 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2022 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2023 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2024 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2025 }
2022 } 2026 }
2023 } 2027 #endregion position
2024 #endregion position 2028 #region rotation
2025 #region rotation
2026 2029
2027 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab 2030 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab
2028 {
2029 if (OnUpdatePrimSingleRotation != null)
2030 { 2031 {
2031 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 2032 if (OnUpdatePrimSingleRotation != null)
2032 //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2033 {
2033 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2034 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
2035 //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2036 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2037 }
2034 } 2038 }
2035 } 2039 else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
2036 else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
2037 {
2038 if (OnUpdatePrimSingleRotation != null)
2039 { 2040 {
2040 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2041 if (OnUpdatePrimSingleRotation != null)
2041 //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2042 {
2042 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2043 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2044 //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2045 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2046 }
2043 } 2047 }
2044 } 2048 else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
2045 else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
2046 {
2047 if (OnUpdatePrimGroupRotation != null)
2048 { 2049 {
2049 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 2050 if (OnUpdatePrimGroupRotation != null)
2050 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2051 {
2051 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2052 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
2053 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2054 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2055 }
2052 } 2056 }
2053 } 2057 else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
2054 else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
2055 {
2056 if (OnUpdatePrimGroupMouseRotation != null)
2057 { 2058 {
2058 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2059 if (OnUpdatePrimGroupMouseRotation != null)
2059 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2060 {
2060 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2061 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2061 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2062 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2062 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); 2063 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2064 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2065 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
2066 }
2063 } 2067 }
2064 } 2068 #endregion
2065 #endregion 2069 #region scale
2066 #region scale
2067 2070
2068 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab 2071 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab
2069 {
2070 if (OnUpdatePrimScale != null)
2071 { 2072 {
2072 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2073 if (OnUpdatePrimScale != null)
2073 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2074 {
2074 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2075 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2075 2076 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2076 // Change the position based on scale (for bug number 246) 2077 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2077 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2078
2078 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2079 // Change the position based on scale (for bug number 246)
2079 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2080 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2081 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2082 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2083 }
2080 } 2084 }
2081 } 2085 else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
2082 else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
2083 {
2084 if (OnUpdatePrimScale != null)
2085 { 2086 {
2086 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2087 if (OnUpdatePrimScale != null)
2087 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); 2088 {
2088 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2089 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2089 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2090 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
2090 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2091 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2092 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2093 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2094 }
2091 } 2095 }
2092 } 2096 else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
2093 else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
2094 {
2095 if (OnUpdatePrimScale != null)
2096 { 2097 {
2097 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2098 if (OnUpdatePrimScale != null)
2098 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2099 {
2099 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2100 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2101 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2102 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2103 }
2100 } 2104 }
2101 } 2105 else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
2102 else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
2103 {
2104 if (OnUpdatePrimScale != null)
2105 { 2106 {
2106 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2107 if (OnUpdatePrimScale != null)
2107 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2108 {
2108 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2109 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2110 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2111 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2112 }
2109 } 2113 }
2110 }
2111 2114
2112 #endregion 2115 #endregion
2116 }
2117 } // editobj != null;
2118 else
2119 {
2120 // It's a ghost! tell the client to delete it from view.
2121 simClient.SendKillObject(this.Scene.RegionInfo.RegionHandle, multipleupdate.ObjectData[i].ObjectLocalID);
2113 } 2122 }
2123
2114 } 2124 }
2115 } 2125 }
2116 return true; 2126 return true;