factor common code out into SOP.RemoveFromPhysics()

This commit is contained in:
Justin Clark-Casey (justincc)
2011-10-15 02:02:39 +01:00
parent 978fb3d482
commit c93c9ea072
3 changed files with 19 additions and 11 deletions

View File

@@ -530,10 +530,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
so.AttachedAvatar = sp.UUID;
if (so.RootPart.PhysActor != null)
{
m_scene.PhysicsScene.RemovePrim(so.RootPart.PhysActor);
so.RootPart.PhysActor = null;
}
so.RootPart.RemoveFromPhysics();
so.AbsolutePosition = attachOffset;
so.RootPart.AttachedPos = attachOffset;