From 7eff1572cbe4ca75d133361ebc7a3f59ac9b8016 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 5 Nov 2007 04:33:06 +0000 Subject: Thank you, Teravus for: Solution for 'after using physical prim with MonoSqliteDataStore, the sim lags with constantly updating assets.". This mostly affects BulletX. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 6 +++++- .../OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 13 ++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 1852ba7..4c6865a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -579,7 +579,11 @@ namespace OpenSim.Region.Environment.Scenes { AddTerseUpdateToAllAvatars(); ClearUpdateSchedule(); - ScheduleTerseUpdate(); + if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0) + { + // Only send the constant terse updates on physical objects! + ScheduleTerseUpdate(); + } } else { diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 1b16a07..80c1a31 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -125,8 +125,15 @@ namespace OpenSim.DataStore.MonoSqlite { foreach (SceneObjectPart prim in obj.Children.Values) { - MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); - addPrim(prim, obj.UUID, regionUUID); + if ((prim.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) + { + MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); + addPrim(prim, obj.UUID, regionUUID); + } + else + { + MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); + } } } @@ -1026,4 +1033,4 @@ namespace OpenSim.DataStore.MonoSqlite } } } -} \ No newline at end of file +} -- cgit v1.1