diff options
author | Sean Dague | 2008-01-08 21:56:52 +0000 |
---|---|---|
committer | Sean Dague | 2008-01-08 21:56:52 +0000 |
commit | ebba112379ad67b066ad903a42f496b8fdb3aba4 (patch) | |
tree | 34c7c4d83f37c9c3be67d11e86f3c6f424434213 /OpenSim | |
parent | * Removed unneeded and uneeded debug message (diff) | |
download | opensim-SC-ebba112379ad67b066ad903a42f496b8fdb3aba4.zip opensim-SC-ebba112379ad67b066ad903a42f496b8fdb3aba4.tar.gz opensim-SC-ebba112379ad67b066ad903a42f496b8fdb3aba4.tar.bz2 opensim-SC-ebba112379ad67b066ad903a42f496b8fdb3aba4.tar.xz |
make Stopped a property of the SceneObjectPart instead of in the
database code, so this is a shared concept.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 9a7f28e..5a02ad4 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -402,6 +402,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
402 | get { return m_shape.Scale; } | 402 | get { return m_shape.Scale; } |
403 | } | 403 | } |
404 | 404 | ||
405 | public bool Stopped | ||
406 | { | ||
407 | get { | ||
408 | double threshold = 0.02; | ||
409 | return (Math.Abs(Velocity.X) < threshold && | ||
410 | Math.Abs(Velocity.Y) < threshold && | ||
411 | Math.Abs(Velocity.Z) < threshold && | ||
412 | Math.Abs(AngularVelocity.X) < threshold && | ||
413 | Math.Abs(AngularVelocity.Y) < threshold && | ||
414 | Math.Abs(AngularVelocity.Z) < threshold); | ||
415 | } | ||
416 | } | ||
417 | |||
405 | #endregion | 418 | #endregion |
406 | 419 | ||
407 | public LLUUID ObjectOwner | 420 | public LLUUID ObjectOwner |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index ac22b42..4d11dfb 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -176,17 +176,6 @@ namespace OpenSim.DataStore.MonoSqlite | |||
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | private bool Stopped(SceneObjectPart prim) | ||
180 | { | ||
181 | double threshold = 0.02; | ||
182 | return (Math.Abs(prim.Velocity.X) < threshold && | ||
183 | Math.Abs(prim.Velocity.Y) < threshold && | ||
184 | Math.Abs(prim.Velocity.Z) < threshold && | ||
185 | Math.Abs(prim.AngularVelocity.X) < threshold && | ||
186 | Math.Abs(prim.AngularVelocity.Y) < threshold && | ||
187 | Math.Abs(prim.AngularVelocity.Z) < threshold); | ||
188 | } | ||
189 | |||
190 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 179 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) |
191 | { | 180 | { |
192 | lock (ds) | 181 | lock (ds) |
@@ -198,7 +187,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
198 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 187 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); |
199 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); | 188 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); |
200 | } | 189 | } |
201 | else if (Stopped(prim)) | 190 | else if (prim.Stopped) |
202 | { | 191 | { |
203 | MainLog.Instance.Verbose("DATASTORE", | 192 | MainLog.Instance.Verbose("DATASTORE", |
204 | "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); | 193 | "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); |