aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs30
1 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 4c6865a..0e2b186 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -231,6 +231,7 @@ namespace OpenSim.Region.Environment.Scenes
231 } 231 }
232 232
233 protected LLVector3 m_velocity; 233 protected LLVector3 m_velocity;
234 protected LLVector3 m_rotationalvelocity;
234 235
235 /// <summary></summary> 236 /// <summary></summary>
236 public LLVector3 Velocity 237 public LLVector3 Velocity
@@ -253,6 +254,28 @@ namespace OpenSim.Region.Environment.Scenes
253 } 254 }
254 set { m_velocity = value; } 255 set { m_velocity = value; }
255 } 256 }
257 public LLVector3 RotationalVelocity
258 {
259 get
260 {
261 //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0
262 //|| PhysActor.Velocity.z != 0)
263 //{
264 if (PhysActor != null)
265 {
266 if (PhysActor.IsPhysical)
267 {
268 m_rotationalvelocity.X = PhysActor.RotationalVelocity.X;
269 m_rotationalvelocity.Y = PhysActor.RotationalVelocity.Y;
270 m_rotationalvelocity.Z = PhysActor.RotationalVelocity.Z;
271 }
272 }
273
274 return m_rotationalvelocity;
275 }
276 set { m_rotationalvelocity = value; }
277 }
278
256 279
257 protected LLVector3 m_angularVelocity; 280 protected LLVector3 m_angularVelocity;
258 281
@@ -384,6 +407,7 @@ namespace OpenSim.Region.Environment.Scenes
384 OffsetPosition = offsetPosition; 407 OffsetPosition = offsetPosition;
385 RotationOffset = rotationOffset; 408 RotationOffset = rotationOffset;
386 Velocity = new LLVector3(0, 0, 0); 409 Velocity = new LLVector3(0, 0, 0);
410 m_rotationalvelocity = new LLVector3(0, 0, 0);
387 AngularVelocity = new LLVector3(0, 0, 0); 411 AngularVelocity = new LLVector3(0, 0, 0);
388 Acceleration = new LLVector3(0, 0, 0); 412 Acceleration = new LLVector3(0, 0, 0);
389 413
@@ -1020,7 +1044,7 @@ namespace OpenSim.Region.Environment.Scenes
1020 } 1044 }
1021 else 1045 else
1022 { 1046 {
1023 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity); 1047 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity, RotationalVelocity);
1024 } 1048 }
1025 } 1049 }
1026 1050
@@ -1033,8 +1057,8 @@ namespace OpenSim.Region.Environment.Scenes
1033 } 1057 }
1034 else 1058 else
1035 { 1059 {
1036 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity); 1060 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity, RotationalVelocity);
1037 //System.Console.WriteLine("Vel:" + Velocity); 1061 //System.Console.WriteLine("RVel:" + RotationalVelocity);
1038 } 1062 }
1039 } 1063 }
1040 1064