aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorSean Dague2008-07-01 21:31:02 +0000
committerSean Dague2008-07-01 21:31:02 +0000
commitf162f4544cc1f5903633d046db8fe0d75d4eaf98 (patch)
tree4b428896ee61b505b01a794ce280ae989cd324b7 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentAdded "save-prims-xml2 <PrimName> <FileName>", as we were lacking a method to... (diff)
downloadopensim-SC_OLD-f162f4544cc1f5903633d046db8fe0d75d4eaf98.zip
opensim-SC_OLD-f162f4544cc1f5903633d046db8fe0d75d4eaf98.tar.gz
opensim-SC_OLD-f162f4544cc1f5903633d046db8fe0d75d4eaf98.tar.bz2
opensim-SC_OLD-f162f4544cc1f5903633d046db8fe0d75d4eaf98.tar.xz
merge rotational and angular velocity
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs35
1 files changed, 13 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 4a68514..13968ec 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -196,7 +196,6 @@ namespace OpenSim.Region.Environment.Scenes
196 protected byte[] m_particleSystem = new byte[0]; 196 protected byte[] m_particleSystem = new byte[0];
197 protected ulong m_regionHandle; 197 protected ulong m_regionHandle;
198 protected LLQuaternion m_rotationOffset; 198 protected LLQuaternion m_rotationOffset;
199 protected LLVector3 m_rotationalvelocity;
200 protected PrimitiveBaseShape m_shape; 199 protected PrimitiveBaseShape m_shape;
201 protected LLUUID m_uuid; 200 protected LLUUID m_uuid;
202 protected LLVector3 m_velocity; 201 protected LLVector3 m_velocity;
@@ -255,7 +254,6 @@ namespace OpenSim.Region.Environment.Scenes
255 OffsetPosition = offsetPosition; 254 OffsetPosition = offsetPosition;
256 RotationOffset = rotationOffset; 255 RotationOffset = rotationOffset;
257 Velocity = new LLVector3(0, 0, 0); 256 Velocity = new LLVector3(0, 0, 0);
258 m_rotationalvelocity = new LLVector3(0, 0, 0);
259 AngularVelocity = new LLVector3(0, 0, 0); 257 AngularVelocity = new LLVector3(0, 0, 0);
260 Acceleration = new LLVector3(0, 0, 0); 258 Acceleration = new LLVector3(0, 0, 0);
261 m_TextureAnimation = new byte[0]; 259 m_TextureAnimation = new byte[0];
@@ -601,28 +599,21 @@ namespace OpenSim.Region.Environment.Scenes
601 599
602 public LLVector3 RotationalVelocity 600 public LLVector3 RotationalVelocity
603 { 601 {
604 get 602 get { return AngularVelocity; }
605 { 603 set { AngularVelocity = value; }
606 //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0
607 //|| PhysActor.Velocity.z != 0)
608 //{
609 if (PhysActor != null)
610 {
611 if (PhysActor.IsPhysical)
612 {
613 m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0);
614 }
615 }
616
617 return m_rotationalvelocity;
618 }
619 set { m_rotationalvelocity = value; }
620 } 604 }
621 605
622 /// <summary></summary> 606 /// <summary></summary>
623 public LLVector3 AngularVelocity 607 public LLVector3 AngularVelocity
624 { 608 {
625 get { return m_angularVelocity; } 609 get
610 {
611 if ((PhysActor != null) && PhysActor.IsPhysical)
612 {
613 m_angularVelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0);
614 }
615 return m_angularVelocity;
616 }
626 set { m_angularVelocity = value; } 617 set { m_angularVelocity = value; }
627 } 618 }
628 619
@@ -1308,9 +1299,9 @@ namespace OpenSim.Region.Environment.Scenes
1308 info.AddValue("m_velocity.Y", m_velocity.Y); 1299 info.AddValue("m_velocity.Y", m_velocity.Y);
1309 info.AddValue("m_velocity.Z", m_velocity.Z); 1300 info.AddValue("m_velocity.Z", m_velocity.Z);
1310 1301
1311 info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X); 1302 info.AddValue("m_rotationalvelocity.X", RotationalVelocity.X);
1312 info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y); 1303 info.AddValue("m_rotationalvelocity.Y", RotationalVelocity.Y);
1313 info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z); 1304 info.AddValue("m_rotationalvelocity.Z", RotationalVelocity.Z);
1314 1305
1315 info.AddValue("m_angularVelocity.X", m_angularVelocity.X); 1306 info.AddValue("m_angularVelocity.X", m_angularVelocity.X);
1316 info.AddValue("m_angularVelocity.Y", m_angularVelocity.Y); 1307 info.AddValue("m_angularVelocity.Y", m_angularVelocity.Y);