aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2007-11-15 19:11:25 +0000
committerSean Dague2007-11-15 19:11:25 +0000
commit886f8b5548fa7b781b4382f607a44734c88f549b (patch)
tree6075ee708e2351f4f3ccdf9fd82061f68601b23e
parent* ODE - Started the refactoring process to allow breaking up the scene into s... (diff)
downloadopensim-SC-886f8b5548fa7b781b4382f607a44734c88f549b.zip
opensim-SC-886f8b5548fa7b781b4382f607a44734c88f549b.tar.gz
opensim-SC-886f8b5548fa7b781b4382f607a44734c88f549b.tar.bz2
opensim-SC-886f8b5548fa7b781b4382f607a44734c88f549b.tar.xz
make Stopped a bit sloppier which should help address any float round off issues
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index 41bd718..44461df 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -122,12 +122,13 @@ namespace OpenSim.DataStore.MonoSqlite
122 122
123 private bool Stopped(SceneObjectPart prim) 123 private bool Stopped(SceneObjectPart prim)
124 { 124 {
125 return (prim.Velocity.X == 0.0 && 125 double threshold = 0.02;
126 prim.Velocity.Y == 0.0 && 126 return (Math.Abs(prim.Velocity.X) < threshold &&
127 prim.Velocity.Z == 0.0 && 127 Math.Abs(prim.Velocity.Y) < threshold &&
128 prim.AngularVelocity.X == 0.0 && 128 Math.Abs(prim.Velocity.Z) < threshold &&
129 prim.AngularVelocity.Y == 0.0 && 129 Math.Abs(prim.AngularVelocity.X) < threshold &&
130 prim.AngularVelocity.Z == 0.0); 130 Math.Abs(prim.AngularVelocity.Y) < threshold &&
131 Math.Abs(prim.AngularVelocity.Z) < threshold);
131 } 132 }
132 133
133 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 134 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID)