diff options
added first attempt at storing stopped physical objects
Diffstat (limited to 'OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 18 |
1 files changed, 17 insertions, 1 deletions
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 | |||
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | private bool Stopped(SceneObjectPart prim) | ||
124 | { | ||
125 | return (prim.Velocity.X == 0.0 && | ||
126 | prim.Velocity.Y == 0.0 && | ||
127 | prim.Velocity.Z == 0.0 && | ||
128 | prim.AngularVelocity.X == 0.0 && | ||
129 | prim.AngularVelocity.Y == 0.0 && | ||
130 | prim.AngularVelocity.Z == 0.0); | ||
131 | } | ||
132 | |||
123 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 133 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) |
124 | { | 134 | { |
125 | lock (ds) | 135 | lock (ds) |
@@ -131,9 +141,15 @@ namespace OpenSim.DataStore.MonoSqlite | |||
131 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 141 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); |
132 | addPrim(prim, obj.UUID, regionUUID); | 142 | addPrim(prim, obj.UUID, regionUUID); |
133 | } | 143 | } |
144 | else if (Stopped(prim)) | ||
145 | { | ||
146 | MainLog.Instance.Verbose("DATASTORE", "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); | ||
147 | addPrim(prim, obj.UUID, regionUUID); | ||
148 | } | ||
134 | else | 149 | else |
135 | { | 150 | { |
136 | // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); | 151 | // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); |
152 | |||
137 | } | 153 | } |
138 | } | 154 | } |
139 | } | 155 | } |