When a mesh object is added to a scene, delay adding the physics actor until the sculpt data has been added to the shape (possibly via an async asset service request)

This prevents spurious 'no asset data' for meshes added on startup.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-07-12 02:33:09 +01:00
parent dbd954d701
commit df0e5cc9fe
5 changed files with 39 additions and 29 deletions

View File

@@ -1896,7 +1896,12 @@ namespace OpenSim.Region.Framework.Scenes
}
}
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
// If this part is a sculpt then delay the physics update until we've asynchronously loaded the
// mesh data.
if (((OpenMetaverse.SculptType)Shape.SculptType) == SculptType.Mesh)
CheckSculptAndLoad();
else
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
}
}
}