Move a check for null PhysActor in applyImpulse so that attachments can move avatars.
Fixes Mantis #31600.6.5-rc1
parent
14b94b8d05
commit
2d387c25b8
|
@ -1514,19 +1514,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart rootpart = m_rootPart;
|
SceneObjectPart rootpart = m_rootPart;
|
||||||
if (rootpart != null)
|
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);
|
avatar.PushForce(impulse);
|
||||||
if (avatar != null)
|
|
||||||
{
|
|
||||||
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);
|
m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue