aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMW2007-11-04 14:06:41 +0000
committerMW2007-11-04 14:06:41 +0000
commite50a2e2ce21d74f7d575f97201c246c1cd00bee5 (patch)
tree7508b7adc0c125fcbe327d4d4cacd1bbfe412180 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentAdded support for OpenSim application plugins (as requested by Adam), which u... (diff)
downloadopensim-SC-e50a2e2ce21d74f7d575f97201c246c1cd00bee5.zip
opensim-SC-e50a2e2ce21d74f7d575f97201c246c1cd00bee5.tar.gz
opensim-SC-e50a2e2ce21d74f7d575f97201c246c1cd00bee5.tar.bz2
opensim-SC-e50a2e2ce21d74f7d575f97201c246c1cd00bee5.tar.xz
Applying Teravus patch # 557. Some glue code for the updating of prim's velocity.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs38
1 files changed, 34 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 535e765..1852ba7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -235,7 +235,22 @@ namespace OpenSim.Region.Environment.Scenes
235 /// <summary></summary> 235 /// <summary></summary>
236 public LLVector3 Velocity 236 public LLVector3 Velocity
237 { 237 {
238 get { return m_velocity; } 238 get {
239 //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0
240 //|| PhysActor.Velocity.z != 0)
241 //{
242 if (PhysActor != null)
243 {
244 if (PhysActor.IsPhysical)
245 {
246 m_velocity.X = PhysActor.Velocity.X;
247 m_velocity.Y = PhysActor.Velocity.Y;
248 m_velocity.Z = PhysActor.Velocity.Z;
249 }
250 }
251
252 return m_velocity;
253 }
239 set { m_velocity = value; } 254 set { m_velocity = value; }
240 } 255 }
241 256
@@ -995,13 +1010,28 @@ namespace OpenSim.Region.Environment.Scenes
995 LLVector3 lPos; 1010 LLVector3 lPos;
996 lPos = OffsetPosition; 1011 lPos = OffsetPosition;
997 LLQuaternion mRot = RotationOffset; 1012 LLQuaternion mRot = RotationOffset;
998 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); 1013 if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0)
1014 {
1015 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot);
1016 }
1017 else
1018 {
1019 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity);
1020 }
999 } 1021 }
1000 1022
1001 public void SendTerseUpdateToClient(IClientAPI remoteClient, LLVector3 lPos) 1023 public void SendTerseUpdateToClient(IClientAPI remoteClient, LLVector3 lPos)
1002 { 1024 {
1003 LLQuaternion mRot = RotationOffset; 1025 LLQuaternion mRot = RotationOffset;
1004 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); 1026 if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0)
1027 {
1028 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot);
1029 }
1030 else
1031 {
1032 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity);
1033 //System.Console.WriteLine("Vel:" + Velocity);
1034 }
1005 } 1035 }
1006 1036
1007 #endregion 1037 #endregion
@@ -1113,4 +1143,4 @@ namespace OpenSim.Region.Environment.Scenes
1113 } 1143 }
1114 } 1144 }
1115 } 1145 }
1116} \ No newline at end of file 1146}