From d299f8b55cb0e3848dbcbb941a5789d52459bc44 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 14 Sep 2010 19:41:53 +0200 Subject: Fix a small left over buglet and also add checking of the physics actor position on backup. This way, ant object that has been moved will be checked for ghost prims as soon as it is persisted. --- OpenSim/Region/Application/ConfigurationLoader.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index b76e85d..6e3d6af 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -100,7 +100,7 @@ namespace OpenSim if (masterFileName != String.Empty) { - if (File.Exists(masterFilePath) + if (File.Exists(masterFilePath)) { if (!sources.Contains(masterFilePath)) sources.Add(masterFilePath); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a952508..37630e0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1786,6 +1786,16 @@ namespace OpenSim.Region.Framework.Scenes // don't backup while it's selected or you're asking for changes mid stream. if (isTimeToPersist() || forcedBackup) { + if (m_rootPart.PhysActor != null && + (!m_rootPart.PhysActor.IsPhysical)) + { + if (m_rootPart.PhysActor.Position != m_rootPart.GroupPosition) + { + m_rootPart.PhysActor.Position = m_rootPart.GroupPosition; + m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; + m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); + } + } // m_log.DebugFormat( // "[SCENE]: Storing {0}, {1} in {2}", // Name, UUID, m_scene.RegionInfo.RegionName); -- cgit v1.1