mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Move a check for null PhysActor in applyImpulse so that attachments can move avatars.
Fixes Mantis #3160
This commit is contained in:
@@ -1514,19 +1514,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SceneObjectPart rootpart = m_rootPart;
|
||||
if (rootpart != null)
|
||||
{
|
||||
if (rootpart.PhysActor != null)
|
||||
if (IsAttachment)
|
||||
{
|
||||
if (IsAttachment)
|
||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||
if (avatar != null)
|
||||
{
|
||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||
if (avatar != null)
|
||||
{
|
||||
avatar.PushForce(impulse);
|
||||
}
|
||||
avatar.PushForce(impulse);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rootpart.PhysActor != null)
|
||||
{
|
||||
rootpart.PhysActor.AddForce(impulse,true);
|
||||
rootpart.PhysActor.AddForce(impulse, true);
|
||||
m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user