diff options
author | Teravus Ovares | 2007-11-08 00:10:40 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-08 00:10:40 +0000 |
commit | 9e9dad1cde362de093d0d7e6c3e247ff00ceac96 (patch) | |
tree | 72b364a18532ee152cfbd72df0158b8a2e001464 /OpenSim/Region/Environment/Scenes | |
parent | set svn:eol-style (diff) | |
download | opensim-SC-9e9dad1cde362de093d0d7e6c3e247ff00ceac96.zip opensim-SC-9e9dad1cde362de093d0d7e6c3e247ff00ceac96.tar.gz opensim-SC-9e9dad1cde362de093d0d7e6c3e247ff00ceac96.tar.bz2 opensim-SC-9e9dad1cde362de093d0d7e6c3e247ff00ceac96.tar.xz |
* Added Rotational Velocity reporting for Client Interpolation to Terse Updates
* Added Angular Velocity reporting for smooth-ish rotations on object collisions
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EntityBase.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 30 |
2 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index d0cbcf6..1c21159 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
69 | } | 69 | } |
70 | 70 | ||
71 | protected LLVector3 m_velocity; | 71 | protected LLVector3 m_velocity; |
72 | protected LLVector3 m_rotationalvelocity; | ||
72 | 73 | ||
73 | /// <summary> | 74 | /// <summary> |
74 | /// | 75 | /// |
@@ -106,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
106 | m_velocity = new LLVector3(); | 107 | m_velocity = new LLVector3(); |
107 | Rotation = new Quaternion(); | 108 | Rotation = new Quaternion(); |
108 | m_name = "(basic entity)"; | 109 | m_name = "(basic entity)"; |
109 | 110 | m_rotationalvelocity = new LLVector3(0, 0, 0); | |
110 | m_children = new List<EntityBase>(); | 111 | m_children = new List<EntityBase>(); |
111 | } | 112 | } |
112 | 113 | ||
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 | ||