Thank you kindly, Marcus Llewellyn, for a patch that:
An attachment with the physical checkbox checked will not allow the phantom checkbox to be cleared. This interfers with scripting functions such as llMoveToTarget(), which won't work while an object is phantom. If the prim containing the script is rezzed to the ground, it will then allow the phantom checlbox to be cleared, and the script works as expected.0.6.5-rc1
parent
d35c86928d
commit
84602c9480
|
@ -1596,11 +1596,31 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
SceneObjectPart rootpart = m_rootPart;
|
||||
if (rootpart != null)
|
||||
{
|
||||
if (rootpart.PhysActor != null)
|
||||
if (IsAttachment)
|
||||
{
|
||||
rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z);
|
||||
rootpart.PhysActor.PIDTau = tau;
|
||||
rootpart.PhysActor.PIDActive = true;
|
||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||
if (avatar != null)
|
||||
{
|
||||
List<string> coords = new List<string>();
|
||||
uint regionX = 0;
|
||||
uint regionY = 0;
|
||||
Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
|
||||
target.X += regionX;
|
||||
target.Y += regionY;
|
||||
coords.Add(target.X.ToString());
|
||||
coords.Add(target.Y.ToString());
|
||||
coords.Add(target.Z.ToString());
|
||||
avatar.DoMoveToPosition(avatar, "", coords);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rootpart.PhysActor != null)
|
||||
{
|
||||
rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z);
|
||||
rootpart.PhysActor.PIDTau = tau;
|
||||
rootpart.PhysActor.PIDActive = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue