diff options
author | John Hurliman | 2009-11-02 11:28:35 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-02 11:28:35 -0800 |
commit | 67ac9881faf2034facfe92613538938695c2cda9 (patch) | |
tree | ac2fcdfe3c9c99120ba2c9901d5175e1389fa622 /OpenSim | |
parent | Reverting the memory leak patch for MySQL. Problems have been reported with t... (diff) | |
download | opensim-SC_OLD-67ac9881faf2034facfe92613538938695c2cda9.zip opensim-SC_OLD-67ac9881faf2034facfe92613538938695c2cda9.tar.gz opensim-SC_OLD-67ac9881faf2034facfe92613538938695c2cda9.tar.bz2 opensim-SC_OLD-67ac9881faf2034facfe92613538938695c2cda9.tar.xz |
Removing duplicate SceneObjectPart.RotationalVelocity property
Diffstat (limited to 'OpenSim')
8 files changed, 26 insertions, 36 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs index cff6b00..6371307 100644 --- a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs | |||
@@ -1049,7 +1049,7 @@ VALUES | |||
1049 | if (!(primRow["ParticleSystem"] is DBNull)) | 1049 | if (!(primRow["ParticleSystem"] is DBNull)) |
1050 | prim.ParticleSystem = (Byte[])primRow["ParticleSystem"]; | 1050 | prim.ParticleSystem = (Byte[])primRow["ParticleSystem"]; |
1051 | 1051 | ||
1052 | prim.RotationalVelocity = new Vector3( | 1052 | prim.AngularVelocity = new Vector3( |
1053 | Convert.ToSingle(primRow["OmegaX"]), | 1053 | Convert.ToSingle(primRow["OmegaX"]), |
1054 | Convert.ToSingle(primRow["OmegaY"]), | 1054 | Convert.ToSingle(primRow["OmegaY"]), |
1055 | Convert.ToSingle(primRow["OmegaZ"])); | 1055 | Convert.ToSingle(primRow["OmegaZ"])); |
@@ -1429,9 +1429,9 @@ VALUES | |||
1429 | parameters.Add(_Database.CreateParameter("TextureAnimation", prim.TextureAnimation)); | 1429 | parameters.Add(_Database.CreateParameter("TextureAnimation", prim.TextureAnimation)); |
1430 | parameters.Add(_Database.CreateParameter("ParticleSystem", prim.ParticleSystem)); | 1430 | parameters.Add(_Database.CreateParameter("ParticleSystem", prim.ParticleSystem)); |
1431 | 1431 | ||
1432 | parameters.Add(_Database.CreateParameter("OmegaX", prim.RotationalVelocity.X)); | 1432 | parameters.Add(_Database.CreateParameter("OmegaX", prim.AngularVelocity.X)); |
1433 | parameters.Add(_Database.CreateParameter("OmegaY", prim.RotationalVelocity.Y)); | 1433 | parameters.Add(_Database.CreateParameter("OmegaY", prim.AngularVelocity.Y)); |
1434 | parameters.Add(_Database.CreateParameter("OmegaZ", prim.RotationalVelocity.Z)); | 1434 | parameters.Add(_Database.CreateParameter("OmegaZ", prim.AngularVelocity.Z)); |
1435 | 1435 | ||
1436 | parameters.Add(_Database.CreateParameter("CameraEyeOffsetX", prim.GetCameraEyeOffset().X)); | 1436 | parameters.Add(_Database.CreateParameter("CameraEyeOffsetX", prim.GetCameraEyeOffset().X)); |
1437 | parameters.Add(_Database.CreateParameter("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y)); | 1437 | parameters.Add(_Database.CreateParameter("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y)); |
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index a807948..c49153f 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | |||
@@ -908,7 +908,7 @@ namespace OpenSim.Data.MySQL | |||
908 | if (!(row["ParticleSystem"] is DBNull)) | 908 | if (!(row["ParticleSystem"] is DBNull)) |
909 | prim.ParticleSystem = (byte[])row["ParticleSystem"]; | 909 | prim.ParticleSystem = (byte[])row["ParticleSystem"]; |
910 | 910 | ||
911 | prim.RotationalVelocity = new Vector3( | 911 | prim.AngularVelocity = new Vector3( |
912 | (float)(double)row["OmegaX"], | 912 | (float)(double)row["OmegaX"], |
913 | (float)(double)row["OmegaY"], | 913 | (float)(double)row["OmegaY"], |
914 | (float)(double)row["OmegaZ"] | 914 | (float)(double)row["OmegaZ"] |
@@ -1240,9 +1240,9 @@ namespace OpenSim.Data.MySQL | |||
1240 | cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation); | 1240 | cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation); |
1241 | cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem); | 1241 | cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem); |
1242 | 1242 | ||
1243 | cmd.Parameters.AddWithValue("OmegaX", (double)prim.RotationalVelocity.X); | 1243 | cmd.Parameters.AddWithValue("OmegaX", (double)prim.AngularVelocity.X); |
1244 | cmd.Parameters.AddWithValue("OmegaY", (double)prim.RotationalVelocity.Y); | 1244 | cmd.Parameters.AddWithValue("OmegaY", (double)prim.AngularVelocity.Y); |
1245 | cmd.Parameters.AddWithValue("OmegaZ", (double)prim.RotationalVelocity.Z); | 1245 | cmd.Parameters.AddWithValue("OmegaZ", (double)prim.AngularVelocity.Z); |
1246 | 1246 | ||
1247 | cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X); | 1247 | cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X); |
1248 | cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y); | 1248 | cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y); |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 08af7c3..b68de1a 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -1213,7 +1213,7 @@ namespace OpenSim.Data.SQLite | |||
1213 | if (!row.IsNull("ParticleSystem")) | 1213 | if (!row.IsNull("ParticleSystem")) |
1214 | prim.ParticleSystem = Convert.FromBase64String(row["ParticleSystem"].ToString()); | 1214 | prim.ParticleSystem = Convert.FromBase64String(row["ParticleSystem"].ToString()); |
1215 | 1215 | ||
1216 | prim.RotationalVelocity = new Vector3( | 1216 | prim.AngularVelocity = new Vector3( |
1217 | Convert.ToSingle(row["OmegaX"]), | 1217 | Convert.ToSingle(row["OmegaX"]), |
1218 | Convert.ToSingle(row["OmegaY"]), | 1218 | Convert.ToSingle(row["OmegaY"]), |
1219 | Convert.ToSingle(row["OmegaZ"]) | 1219 | Convert.ToSingle(row["OmegaZ"]) |
@@ -1530,9 +1530,9 @@ namespace OpenSim.Data.SQLite | |||
1530 | row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation); | 1530 | row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation); |
1531 | row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem); | 1531 | row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem); |
1532 | 1532 | ||
1533 | row["OmegaX"] = prim.RotationalVelocity.X; | 1533 | row["OmegaX"] = prim.AngularVelocity.X; |
1534 | row["OmegaY"] = prim.RotationalVelocity.Y; | 1534 | row["OmegaY"] = prim.AngularVelocity.Y; |
1535 | row["OmegaZ"] = prim.RotationalVelocity.Z; | 1535 | row["OmegaZ"] = prim.AngularVelocity.Z; |
1536 | 1536 | ||
1537 | row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X; | 1537 | row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X; |
1538 | row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y; | 1538 | row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1e7803f..a6ee40a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4635,7 +4635,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4635 | SceneObjectPart trackedBody = GetSceneObjectPart(joint.TrackedBodyName); // FIXME: causes a sequential lookup | 4635 | SceneObjectPart trackedBody = GetSceneObjectPart(joint.TrackedBodyName); // FIXME: causes a sequential lookup |
4636 | if (trackedBody == null) return; // the actor may have been deleted but the joint still lingers around a few frames waiting for deletion. during this time, trackedBody is NULL to prevent further motion of the joint proxy. | 4636 | if (trackedBody == null) return; // the actor may have been deleted but the joint still lingers around a few frames waiting for deletion. during this time, trackedBody is NULL to prevent further motion of the joint proxy. |
4637 | jointProxyObject.Velocity = trackedBody.Velocity; | 4637 | jointProxyObject.Velocity = trackedBody.Velocity; |
4638 | jointProxyObject.RotationalVelocity = trackedBody.RotationalVelocity; | 4638 | jointProxyObject.AngularVelocity = trackedBody.AngularVelocity; |
4639 | switch (joint.Type) | 4639 | switch (joint.Type) |
4640 | { | 4640 | { |
4641 | case PhysicsJointType.Ball: | 4641 | case PhysicsJointType.Ball: |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3d41666..474ffdd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -683,12 +683,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
683 | } | 683 | } |
684 | } | 684 | } |
685 | 685 | ||
686 | public Vector3 RotationalVelocity | ||
687 | { | ||
688 | get { return AngularVelocity; } | ||
689 | set { AngularVelocity = value; } | ||
690 | } | ||
691 | |||
692 | /// <summary></summary> | 686 | /// <summary></summary> |
693 | public Vector3 AngularVelocity | 687 | public Vector3 AngularVelocity |
694 | { | 688 | { |
@@ -1552,9 +1546,9 @@ if (m_shape != null) { | |||
1552 | m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed? | 1546 | m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed? |
1553 | 1547 | ||
1554 | // make sure client isn't interpolating the joint proxy object | 1548 | // make sure client isn't interpolating the joint proxy object |
1555 | Velocity = new Vector3(0, 0, 0); | 1549 | Velocity = Vector3.Zero; |
1556 | RotationalVelocity = new Vector3(0, 0, 0); | 1550 | AngularVelocity = Vector3.Zero; |
1557 | Acceleration = new Vector3(0, 0, 0); | 1551 | Acceleration = Vector3.Zero; |
1558 | } | 1552 | } |
1559 | } | 1553 | } |
1560 | } | 1554 | } |
@@ -2384,7 +2378,7 @@ if (m_shape != null) { | |||
2384 | 2378 | ||
2385 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; | 2379 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; |
2386 | remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape, | 2380 | remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape, |
2387 | lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID, | 2381 | lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID, |
2388 | m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, | 2382 | m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, |
2389 | AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); | 2383 | AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); |
2390 | } | 2384 | } |
@@ -2405,7 +2399,7 @@ if (m_shape != null) { | |||
2405 | if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | 2399 | if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || |
2406 | !Acceleration.Equals(m_lastAcceleration) || | 2400 | !Acceleration.Equals(m_lastAcceleration) || |
2407 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | 2401 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || |
2408 | !RotationalVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || | 2402 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || |
2409 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || | 2403 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || |
2410 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) | 2404 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) |
2411 | { | 2405 | { |
@@ -2425,7 +2419,7 @@ if (m_shape != null) { | |||
2425 | m_lastRotation = RotationOffset; | 2419 | m_lastRotation = RotationOffset; |
2426 | m_lastVelocity = Velocity; | 2420 | m_lastVelocity = Velocity; |
2427 | m_lastAcceleration = Acceleration; | 2421 | m_lastAcceleration = Acceleration; |
2428 | m_lastAngularVelocity = RotationalVelocity; | 2422 | m_lastAngularVelocity = AngularVelocity; |
2429 | m_lastTerseSent = Environment.TickCount; | 2423 | m_lastTerseSent = Environment.TickCount; |
2430 | } | 2424 | } |
2431 | } | 2425 | } |
@@ -3787,7 +3781,7 @@ if (m_shape != null) { | |||
3787 | remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle, | 3781 | remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle, |
3788 | m_parentGroup.GetTimeDilation(), LocalId, lPos, | 3782 | m_parentGroup.GetTimeDilation(), LocalId, lPos, |
3789 | RotationOffset, Velocity, Acceleration, | 3783 | RotationOffset, Velocity, Acceleration, |
3790 | RotationalVelocity, state, FromItemID, | 3784 | AngularVelocity, state, FromItemID, |
3791 | OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient))); | 3785 | OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient))); |
3792 | } | 3786 | } |
3793 | 3787 | ||
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs index fbe43d6..2c5093f 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs | |||
@@ -81,12 +81,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
81 | y.Scale = new Vector3(0.01f,0.01f,0.01f); | 81 | y.Scale = new Vector3(0.01f,0.01f,0.01f); |
82 | y.LastOwnerID = UUID.Zero; | 82 | y.LastOwnerID = UUID.Zero; |
83 | y.GroupPosition = groupPos; | 83 | y.GroupPosition = groupPos; |
84 | y.OffsetPosition = new Vector3(0, 0, 0); | 84 | y.OffsetPosition = Vector3.Zero; |
85 | y.RotationOffset = new Quaternion(0,0,0,0); | 85 | y.RotationOffset = Quaternion.Identity; |
86 | y.Velocity = new Vector3(0, 0, 0); | 86 | y.Velocity = Vector3.Zero; |
87 | y.RotationalVelocity = new Vector3(0, 0, 0); | 87 | y.AngularVelocity = Vector3.Zero; |
88 | y.AngularVelocity = new Vector3(0, 0, 0); | 88 | y.Acceleration = Vector3.Zero; |
89 | y.Acceleration = new Vector3(0, 0, 0); | ||
90 | 89 | ||
91 | y.Flags = 0; | 90 | y.Flags = 0; |
92 | y.TrimPermissions(); | 91 | y.TrimPermissions(); |
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/SceneObjectGroupDiff.cs index e185351..a6afa5a 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/SceneObjectGroupDiff.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/SceneObjectGroupDiff.cs | |||
@@ -172,8 +172,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
172 | result |= Diff.ANGULARVELOCITY; | 172 | result |= Diff.ANGULARVELOCITY; |
173 | if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition)) | 173 | if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition)) |
174 | result |= Diff.OFFSETPOSITION; | 174 | result |= Diff.OFFSETPOSITION; |
175 | if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity)) | ||
176 | result |= Diff.ROTATIONALVELOCITY; | ||
177 | if (!AreVectorsEquivalent(first.Scale, second.Scale)) | 175 | if (!AreVectorsEquivalent(first.Scale, second.Scale)) |
178 | result |= Diff.SCALE; | 176 | result |= Diff.SCALE; |
179 | if (!AreVectorsEquivalent(first.Velocity, second.Velocity)) | 177 | if (!AreVectorsEquivalent(first.Velocity, second.Velocity)) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 64f7c8d..0ea62d7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2163,7 +2163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2163 | public LSL_Vector llGetOmega() | 2163 | public LSL_Vector llGetOmega() |
2164 | { | 2164 | { |
2165 | m_host.AddScriptLPS(1); | 2165 | m_host.AddScriptLPS(1); |
2166 | return new LSL_Vector(m_host.RotationalVelocity.X, m_host.RotationalVelocity.Y, m_host.RotationalVelocity.Z); | 2166 | return new LSL_Vector(m_host.AngularVelocity.X, m_host.AngularVelocity.Y, m_host.AngularVelocity.Z); |
2167 | } | 2167 | } |
2168 | 2168 | ||
2169 | public LSL_Float llGetTimeOfDay() | 2169 | public LSL_Float llGetTimeOfDay() |
@@ -3159,7 +3159,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3159 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) | 3159 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) |
3160 | { | 3160 | { |
3161 | m_host.AddScriptLPS(1); | 3161 | m_host.AddScriptLPS(1); |
3162 | m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | ||
3163 | m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 3162 | m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); |
3164 | m_host.ScheduleTerseUpdate(); | 3163 | m_host.ScheduleTerseUpdate(); |
3165 | m_host.SendTerseUpdateToAllClients(); | 3164 | m_host.SendTerseUpdateToAllClients(); |