aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2009-10-02 00:45:31 +0100
committerMelanie2009-10-02 00:45:31 +0100
commitd6301db382111bf57a7893215ea84b7e6b09187e (patch)
tree78c69a2354f8b84afda180043cb0c1c5d6d7e7a3 /OpenSim/Region/Framework
parentAdd "dump asset" command to remote asset connector (the only one that uses a (diff)
downloadopensim-SC_OLD-d6301db382111bf57a7893215ea84b7e6b09187e.zip
opensim-SC_OLD-d6301db382111bf57a7893215ea84b7e6b09187e.tar.gz
opensim-SC_OLD-d6301db382111bf57a7893215ea84b7e6b09187e.tar.bz2
opensim-SC_OLD-d6301db382111bf57a7893215ea84b7e6b09187e.tar.xz
Revert "* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity"
This reverts commit 39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityBase.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs30
3 files changed, 16 insertions, 36 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs
index 27a0785..c2ec6a5 100644
--- a/OpenSim/Region/Framework/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Framework.Scenes
94 set { m_velocity = value; } 94 set { m_velocity = value; }
95 } 95 }
96 96
97 protected Quaternion m_rotation; 97 protected Quaternion m_rotation = new Quaternion(0f, 0f, 1f, 0f);
98 98
99 public virtual Quaternion Rotation 99 public virtual Quaternion Rotation
100 { 100 {
@@ -102,14 +102,6 @@ namespace OpenSim.Region.Framework.Scenes
102 set { m_rotation = value; } 102 set { m_rotation = value; }
103 } 103 }
104 104
105 protected Vector3 m_scale;
106
107 public virtual Vector3 Scale
108 {
109 get { return m_scale; }
110 set { m_scale = value; }
111 }
112
113 protected uint m_localId; 105 protected uint m_localId;
114 106
115 public virtual uint LocalId 107 public virtual uint LocalId
@@ -123,9 +115,13 @@ namespace OpenSim.Region.Framework.Scenes
123 /// </summary> 115 /// </summary>
124 public EntityBase() 116 public EntityBase()
125 { 117 {
126 m_rotation = Quaternion.Identity; 118 m_uuid = UUID.Zero;
127 m_scale = Vector3.One; 119
120 m_pos = Vector3.Zero;
121 m_velocity = Vector3.Zero;
122 Rotation = Quaternion.Identity;
128 m_name = "(basic entity)"; 123 m_name = "(basic entity)";
124 m_rotationalvelocity = Vector3.Zero;
129 } 125 }
130 126
131 /// <summary> 127 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0aa587e..05a6f13 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2305,8 +2305,8 @@ namespace OpenSim.Region.Framework.Scenes
2305 "to avatar {0} at position {1}", 2305 "to avatar {0} at position {1}",
2306 sp.UUID.ToString(), grp.AbsolutePosition); 2306 sp.UUID.ToString(), grp.AbsolutePosition);
2307 AttachObject(sp.ControllingClient, 2307 AttachObject(sp.ControllingClient,
2308 grp.LocalId, 0, 2308 grp.LocalId, (uint)0,
2309 grp.Rotation, 2309 grp.GroupRotation,
2310 grp.AbsolutePosition, false); 2310 grp.AbsolutePosition, false);
2311 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2311 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2312 grp.SendGroupFullUpdate(); 2312 grp.SendGroupFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 6807e1b..25489d8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -204,22 +204,9 @@ namespace OpenSim.Region.Framework.Scenes
204 get { return m_parts.Count; } 204 get { return m_parts.Count; }
205 } 205 }
206 206
207 public override Quaternion Rotation 207 public Quaternion GroupRotation
208 { 208 {
209 get { return m_rootPart.RotationOffset; } 209 get { return m_rootPart.RotationOffset; }
210 set { m_rootPart.RotationOffset = value; }
211 }
212
213 public override Vector3 Scale
214 {
215 get { return m_rootPart.Scale; }
216 set { m_rootPart.Scale = value; }
217 }
218
219 public override Vector3 Velocity
220 {
221 get { return m_rootPart.Velocity; }
222 set { m_rootPart.Velocity = value; }
223 } 210 }
224 211
225 public UUID GroupID 212 public UUID GroupID
@@ -541,7 +528,7 @@ namespace OpenSim.Region.Framework.Scenes
541 // Temporary commented to stop compiler warning 528 // Temporary commented to stop compiler warning
542 //Vector3 partPosition = 529 //Vector3 partPosition =
543 // new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z); 530 // new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z);
544 Quaternion parentrotation = Rotation; 531 Quaternion parentrotation = GroupRotation;
545 532
546 // Telling the prim to raytrace. 533 // Telling the prim to raytrace.
547 //EntityIntersection inter = part.TestIntersection(hRay, parentrotation); 534 //EntityIntersection inter = part.TestIntersection(hRay, parentrotation);
@@ -1884,17 +1871,14 @@ namespace OpenSim.Region.Framework.Scenes
1884 1871
1885 checkAtTargets(); 1872 checkAtTargets();
1886 1873
1887 Quaternion rot = Rotation; 1874 if (UsePhysics && ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
1888 1875 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
1889 if (UsePhysics && 1876 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
1890 ((Math.Abs(lastPhysGroupRot.W - rot.W) > 0.1f) 1877 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)))
1891 || (Math.Abs(lastPhysGroupRot.X - rot.X) > 0.1f)
1892 || (Math.Abs(lastPhysGroupRot.Y - rot.Y) > 0.1f)
1893 || (Math.Abs(lastPhysGroupRot.Z - rot.Z) > 0.1f)))
1894 { 1878 {
1895 m_rootPart.UpdateFlag = 1; 1879 m_rootPart.UpdateFlag = 1;
1896 1880
1897 lastPhysGroupRot = rot; 1881 lastPhysGroupRot = GroupRotation;
1898 } 1882 }
1899 1883
1900 foreach (SceneObjectPart part in m_parts.Values) 1884 foreach (SceneObjectPart part in m_parts.Values)