aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs119
1 files changed, 74 insertions, 45 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a14e3ad..e5fc027 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -139,7 +139,16 @@ namespace OpenSim.Region.Framework.Scenes
139 public uint TimeStampTerse; 139 public uint TimeStampTerse;
140 140
141 [XmlIgnore] 141 [XmlIgnore]
142 public UUID FromItemID; 142 public UUID FromItemID;
143
144 [XmlIgnore]
145 public int STATUS_ROTATE_X;
146
147 [XmlIgnore]
148 public int STATUS_ROTATE_Y;
149
150 [XmlIgnore]
151 public int STATUS_ROTATE_Z;
143 152
144 [XmlIgnore] 153 [XmlIgnore]
145 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); 154 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>();
@@ -1675,6 +1684,19 @@ namespace OpenSim.Region.Framework.Scenes
1675 return false; 1684 return false;
1676 1685
1677 return m_parentGroup.RootPart.DIE_AT_EDGE; 1686 return m_parentGroup.RootPart.DIE_AT_EDGE;
1687 }
1688
1689 public int GetAxisRotation(int axis)
1690 {
1691 //Cannot use ScriptBaseClass constants as no referance to it currently.
1692 if (axis == 2)//STATUS_ROTATE_X
1693 return STATUS_ROTATE_X;
1694 if (axis == 4)//STATUS_ROTATE_Y
1695 return STATUS_ROTATE_Y;
1696 if (axis == 8)//STATUS_ROTATE_Z
1697 return STATUS_ROTATE_Z;
1698
1699 return 0;
1678 } 1700 }
1679 1701
1680 public double GetDistanceTo(Vector3 a, Vector3 b) 1702 public double GetDistanceTo(Vector3 a, Vector3 b)
@@ -1923,24 +1945,24 @@ namespace OpenSim.Region.Framework.Scenes
1923 else 1945 else
1924 { 1946 {
1925 } 1947 }
1926 } 1948 }
1927 else 1949 else
1928 { 1950 {
1929 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 1951 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
1930 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 1952 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
1931 if (found) 1953 if (found)
1932 { 1954 {
1933 DetectedObject detobj = new DetectedObject(); 1955 DetectedObject detobj = new DetectedObject();
1934 detobj.keyUUID = obj.UUID; 1956 detobj.keyUUID = obj.UUID;
1935 detobj.nameStr = obj.Name; 1957 detobj.nameStr = obj.Name;
1936 detobj.ownerUUID = obj._ownerID; 1958 detobj.ownerUUID = obj._ownerID;
1937 detobj.posVector = obj.AbsolutePosition; 1959 detobj.posVector = obj.AbsolutePosition;
1938 detobj.rotQuat = obj.GetWorldRotation(); 1960 detobj.rotQuat = obj.GetWorldRotation();
1939 detobj.velVector = obj.Velocity; 1961 detobj.velVector = obj.Velocity;
1940 detobj.colliderType = 0; 1962 detobj.colliderType = 0;
1941 detobj.groupUUID = obj._groupID; 1963 detobj.groupUUID = obj._groupID;
1942 colliding.Add(detobj); 1964 colliding.Add(detobj);
1943 } 1965 }
1944 } 1966 }
1945 } 1967 }
1946 else 1968 else
@@ -1952,8 +1974,8 @@ namespace OpenSim.Region.Framework.Scenes
1952 ScenePresence av = avlist[i]; 1974 ScenePresence av = avlist[i];
1953 1975
1954 if (av.LocalId == localId) 1976 if (av.LocalId == localId)
1955 { 1977 {
1956 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 1978 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
1957 { 1979 {
1958 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 1980 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
1959 //If it is 1, it is to accept ONLY collisions from this avatar 1981 //If it is 1, it is to accept ONLY collisions from this avatar
@@ -1974,24 +1996,24 @@ namespace OpenSim.Region.Framework.Scenes
1974 else 1996 else
1975 { 1997 {
1976 } 1998 }
1977 } 1999 }
1978 else 2000 else
1979 { 2001 {
1980 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2002 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
1981 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2003 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
1982 if (found) 2004 if (!found)
1983 { 2005 {
1984 DetectedObject detobj = new DetectedObject(); 2006 DetectedObject detobj = new DetectedObject();
1985 detobj.keyUUID = av.UUID; 2007 detobj.keyUUID = av.UUID;
1986 detobj.nameStr = av.ControllingClient.Name; 2008 detobj.nameStr = av.ControllingClient.Name;
1987 detobj.ownerUUID = av.UUID; 2009 detobj.ownerUUID = av.UUID;
1988 detobj.posVector = av.AbsolutePosition; 2010 detobj.posVector = av.AbsolutePosition;
1989 detobj.rotQuat = av.Rotation; 2011 detobj.rotQuat = av.Rotation;
1990 detobj.velVector = av.Velocity; 2012 detobj.velVector = av.Velocity;
1991 detobj.colliderType = 0; 2013 detobj.colliderType = 0;
1992 detobj.groupUUID = av.ControllingClient.ActiveGroupId; 2014 detobj.groupUUID = av.ControllingClient.ActiveGroupId;
1993 colliding.Add(detobj); 2015 colliding.Add(detobj);
1994 } 2016 }
1995 } 2017 }
1996 2018
1997 } 2019 }
@@ -2088,8 +2110,8 @@ namespace OpenSim.Region.Framework.Scenes
2088 ScenePresence av = avlist[i]; 2110 ScenePresence av = avlist[i];
2089 2111
2090 if (av.LocalId == localId) 2112 if (av.LocalId == localId)
2091 { 2113 {
2092 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2114 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2093 { 2115 {
2094 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2116 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2095 //If it is 1, it is to accept ONLY collisions from this avatar 2117 //If it is 1, it is to accept ONLY collisions from this avatar
@@ -2115,7 +2137,7 @@ namespace OpenSim.Region.Framework.Scenes
2115 { 2137 {
2116 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2138 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2117 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2139 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2118 if (found) 2140 if (!found)
2119 { 2141 {
2120 DetectedObject detobj = new DetectedObject(); 2142 DetectedObject detobj = new DetectedObject();
2121 detobj.keyUUID = av.UUID; 2143 detobj.keyUUID = av.UUID;
@@ -2219,8 +2241,8 @@ namespace OpenSim.Region.Framework.Scenes
2219 ScenePresence av = avlist[i]; 2241 ScenePresence av = avlist[i];
2220 2242
2221 if (av.LocalId == localId) 2243 if (av.LocalId == localId)
2222 { 2244 {
2223 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2245 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2224 { 2246 {
2225 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2247 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2226 //If it is 1, it is to accept ONLY collisions from this avatar 2248 //If it is 1, it is to accept ONLY collisions from this avatar
@@ -2246,7 +2268,7 @@ namespace OpenSim.Region.Framework.Scenes
2246 { 2268 {
2247 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2269 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2248 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2270 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2249 if (found) 2271 if (!found)
2250 { 2272 {
2251 DetectedObject detobj = new DetectedObject(); 2273 DetectedObject detobj = new DetectedObject();
2252 detobj.keyUUID = av.UUID; 2274 detobj.keyUUID = av.UUID;
@@ -2279,7 +2301,7 @@ namespace OpenSim.Region.Framework.Scenes
2279 m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage); 2301 m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage);
2280 } 2302 }
2281 } 2303 }
2282 } 2304 }
2283 } 2305 }
2284 2306
2285 public void PhysicsOutOfBounds(Vector3 pos) 2307 public void PhysicsOutOfBounds(Vector3 pos)
@@ -2747,7 +2769,14 @@ namespace OpenSim.Region.Framework.Scenes
2747 if (m_parentGroup != null) 2769 if (m_parentGroup != null)
2748 { 2770 {
2749 m_parentGroup.SetAxisRotation(axis, rotate); 2771 m_parentGroup.SetAxisRotation(axis, rotate);
2750 } 2772 }
2773 //Cannot use ScriptBaseClass constants as no referance to it currently.
2774 if (axis == 2)//STATUS_ROTATE_X
2775 STATUS_ROTATE_X = rotate;
2776 if (axis == 4)//STATUS_ROTATE_Y
2777 STATUS_ROTATE_Y = rotate;
2778 if (axis == 8)//STATUS_ROTATE_Z
2779 STATUS_ROTATE_Z = rotate;
2751 } 2780 }
2752 2781
2753 public void SetBuoyancy(float fvalue) 2782 public void SetBuoyancy(float fvalue)