From 3ca8eb82a9543d546a6dbefc6174d07f234a357c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 14 Nov 2007 22:39:59 +0000 Subject: added first attempt at storing stopped physical objects --- .../MonoSqliteDataStore.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 582bdfc..41bd718 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -120,6 +120,16 @@ namespace OpenSim.DataStore.MonoSqlite } } + private bool Stopped(SceneObjectPart prim) + { + return (prim.Velocity.X == 0.0 && + prim.Velocity.Y == 0.0 && + prim.Velocity.Z == 0.0 && + prim.AngularVelocity.X == 0.0 && + prim.AngularVelocity.Y == 0.0 && + prim.AngularVelocity.Z == 0.0); + } + public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) { lock (ds) @@ -131,9 +141,15 @@ namespace OpenSim.DataStore.MonoSqlite MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); addPrim(prim, obj.UUID, regionUUID); } + else if (Stopped(prim)) + { + MainLog.Instance.Verbose("DATASTORE", "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); + addPrim(prim, obj.UUID, regionUUID); + } else { - // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); + // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); + } } } -- cgit v1.1