Move a check for null PhysActor in applyImpulse so that attachments can move avatars.

Fixes Mantis #3160
0.6.5-rc1
idb 2009-03-21 11:42:31 +00:00
parent 14b94b8d05
commit 2d387c25b8
1 changed files with 9 additions and 9 deletions

View File

@ -1513,8 +1513,6 @@ namespace OpenSim.Region.Framework.Scenes
// Make sure we don't do that! // Make sure we don't do that!
SceneObjectPart rootpart = m_rootPart; SceneObjectPart rootpart = m_rootPart;
if (rootpart != null) if (rootpart != null)
{
if (rootpart.PhysActor != null)
{ {
if (IsAttachment) if (IsAttachment)
{ {
@ -1525,6 +1523,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
else else
{
if (rootpart.PhysActor != null)
{ {
rootpart.PhysActor.AddForce(impulse, true); rootpart.PhysActor.AddForce(impulse, true);
m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);