Update child prim group positions in moving vehicles

avinationmerge
Melanie 2010-12-24 21:04:10 +01:00
parent 42d44c00f3
commit b16f4024db
1 changed files with 5 additions and 2 deletions

View File

@ -730,9 +730,10 @@ namespace OpenSim.Region.Framework.Scenes
{ {
// If this is a linkset, we don't want the physics engine mucking up our group position here. // If this is a linkset, we don't want the physics engine mucking up our group position here.
PhysicsActor actor = PhysActor; PhysicsActor actor = PhysActor;
if (actor != null && _parentID == 0) if (_parentID == 0)
{ {
m_groupPosition = actor.Position; if (actor != null)
m_groupPosition = actor.Position;
} }
if (IsAttachment) if (IsAttachment)
@ -742,6 +743,8 @@ namespace OpenSim.Region.Framework.Scenes
return sp.AbsolutePosition; return sp.AbsolutePosition;
} }
// use root prim's group position. Physics may have updated it
m_groupPosition = ParentGroup.RootPart.GroupPosition;
return m_groupPosition; return m_groupPosition;
} }
set set