Fix llSetPos to handle child prims correctly. This will fix linked
sliding doors0.6.0-stable
parent
b48885ece4
commit
6f2d077356
|
@ -550,6 +550,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Ignore, and skip over.
|
// Ignore, and skip over.
|
||||||
//}
|
//}
|
||||||
//m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
|
//m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
|
||||||
|
|
||||||
|
if (_parentID != 0)
|
||||||
|
{
|
||||||
|
Vector3 resultingposition = GetWorldPosition();
|
||||||
|
PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z);
|
||||||
|
Quaternion resultingrot = GetWorldRotation();
|
||||||
|
PhysActor.Orientation = resultingrot;
|
||||||
|
|
||||||
|
// Tell the physics engines that this prim changed.
|
||||||
|
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1724,11 +1724,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
|
part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
|
||||||
}
|
}
|
||||||
else
|
else if (part.ParentGroup.RootPart == part)
|
||||||
{
|
{
|
||||||
SceneObjectGroup parent = part.ParentGroup;
|
SceneObjectGroup parent = part.ParentGroup;
|
||||||
parent.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
|
parent.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z);
|
||||||
|
SceneObjectGroup parent = part.ParentGroup;
|
||||||
|
parent.HasGroupChanged = true;
|
||||||
|
parent.ScheduleGroupForTerseUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Vector llGetPos()
|
public LSL_Vector llGetPos()
|
||||||
|
|
Loading…
Reference in New Issue