missing update script events call

avinationmerge
UbitUmarov 2012-05-20 17:30:01 +01:00
parent 11f582b26d
commit 32e63fc04f
1 changed files with 12 additions and 1 deletions

View File

@ -1604,7 +1604,10 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
else if (PhysActor == null) else if (PhysActor == null)
{
ApplyPhysics((uint)Flags, VolumeDetectActive, false); ApplyPhysics((uint)Flags, VolumeDetectActive, false);
UpdatePhysicsSubscribedEvents();
}
else else
{ {
PhysActor.PhysicsShapeType = m_physicsShapeType; PhysActor.PhysicsShapeType = m_physicsShapeType;
@ -4664,7 +4667,15 @@ namespace OpenSim.Region.Framework.Scenes
/// </remarks> /// </remarks>
public void RemoveFromPhysics() public void RemoveFromPhysics()
{ {
ParentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); PhysicsActor pa = PhysActor;
if (pa != null)
{
pa.OnCollisionUpdate -= PhysicsCollision;
pa.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate;
pa.OnOutOfBounds -= PhysicsOutOfBounds;
ParentGroup.Scene.PhysicsScene.RemovePrim(pa);
}
PhysActor = null; PhysActor = null;
} }