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.
avinationmerge
Melanie Thielker 2010-09-14 19:41:53 +02:00
parent ec305a4825
commit d299f8b55c
2 changed files with 11 additions and 1 deletions

View File

@ -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);

View File

@ -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);