make Stopped a bit sloppier which should help address any float round off issues
parent
91b0c44563
commit
886f8b5548
|
@ -122,12 +122,13 @@ namespace OpenSim.DataStore.MonoSqlite
|
||||||
|
|
||||||
private bool Stopped(SceneObjectPart prim)
|
private bool Stopped(SceneObjectPart prim)
|
||||||
{
|
{
|
||||||
return (prim.Velocity.X == 0.0 &&
|
double threshold = 0.02;
|
||||||
prim.Velocity.Y == 0.0 &&
|
return (Math.Abs(prim.Velocity.X) < threshold &&
|
||||||
prim.Velocity.Z == 0.0 &&
|
Math.Abs(prim.Velocity.Y) < threshold &&
|
||||||
prim.AngularVelocity.X == 0.0 &&
|
Math.Abs(prim.Velocity.Z) < threshold &&
|
||||||
prim.AngularVelocity.Y == 0.0 &&
|
Math.Abs(prim.AngularVelocity.X) < threshold &&
|
||||||
prim.AngularVelocity.Z == 0.0);
|
Math.Abs(prim.AngularVelocity.Y) < threshold &&
|
||||||
|
Math.Abs(prim.AngularVelocity.Z) < threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID)
|
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID)
|
||||||
|
|
Loading…
Reference in New Issue