diff options
author | Charles Krinke | 2008-05-28 02:10:16 +0000 |
---|---|---|
committer | Charles Krinke | 2008-05-28 02:10:16 +0000 |
commit | 82e3698f59d3ed8e60cce850c7f05953e69f1175 (patch) | |
tree | b0d1317a9580e87539706dcafff5b2f616738be0 /OpenSim/Region/Environment/Scenes | |
parent | *Hiding the warnings about scanning assemblies when initialising (diff) | |
download | opensim-SC_OLD-82e3698f59d3ed8e60cce850c7f05953e69f1175.zip opensim-SC_OLD-82e3698f59d3ed8e60cce850c7f05953e69f1175.tar.gz opensim-SC_OLD-82e3698f59d3ed8e60cce850c7f05953e69f1175.tar.bz2 opensim-SC_OLD-82e3698f59d3ed8e60cce850c7f05953e69f1175.tar.xz |
Thank you very much, ChrisIndigo for a patch that:
If a script updates an object to the same position or rotation offset,
the object triggers an update and storage of the object. This become
more prevalent in sensor and timer events which may be firing frequently.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 4b174e3..a4ca33d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -2100,16 +2100,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
2100 | /// <param name="pos"></param> | 2100 | /// <param name="pos"></param> |
2101 | public void UpdateOffSet(LLVector3 pos) | 2101 | public void UpdateOffSet(LLVector3 pos) |
2102 | { | 2102 | { |
2103 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | 2103 | if ((pos.X != OffsetPosition.X) || |
2104 | OffsetPosition = newPos; | 2104 | (pos.Y != OffsetPosition.Y) || |
2105 | ScheduleTerseUpdate(); | 2105 | (pos.Z != OffsetPosition.Z)) |
2106 | { | ||
2107 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | ||
2108 | OffsetPosition = newPos; | ||
2109 | ScheduleTerseUpdate(); | ||
2110 | } | ||
2106 | } | 2111 | } |
2107 | 2112 | ||
2108 | public void UpdateGroupPosition(LLVector3 pos) | 2113 | public void UpdateGroupPosition(LLVector3 pos) |
2109 | { | 2114 | { |
2110 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | 2115 | if ((pos.X != GroupPosition.X) || |
2111 | GroupPosition = newPos; | 2116 | (pos.Y != GroupPosition.Y) || |
2112 | ScheduleTerseUpdate(); | 2117 | (pos.Z != GroupPosition.Z)) |
2118 | { | ||
2119 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | ||
2120 | GroupPosition = newPos; | ||
2121 | ScheduleTerseUpdate(); | ||
2122 | } | ||
2113 | } | 2123 | } |
2114 | 2124 | ||
2115 | #endregion | 2125 | #endregion |
@@ -2118,9 +2128,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
2118 | 2128 | ||
2119 | public void UpdateRotation(LLQuaternion rot) | 2129 | public void UpdateRotation(LLQuaternion rot) |
2120 | { | 2130 | { |
2121 | //StoreUndoState(); | 2131 | if ((rot.X != RotationOffset.X) || |
2122 | RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); | 2132 | (rot.Y != RotationOffset.Y) || |
2123 | ScheduleTerseUpdate(); | 2133 | (rot.Z != RotationOffset.Z) || |
2134 | (rot.W != RotationOffset.W)) | ||
2135 | { | ||
2136 | //StoreUndoState(); | ||
2137 | RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); | ||
2138 | ScheduleTerseUpdate(); | ||
2139 | } | ||
2124 | } | 2140 | } |
2125 | 2141 | ||
2126 | #endregion | 2142 | #endregion |