diff options
author | Charles Krinke | 2009-04-22 14:44:19 +0000 |
---|---|---|
committer | Charles Krinke | 2009-04-22 14:44:19 +0000 |
commit | 84602c9480a14e6397381ea40a387a609ada1dbf (patch) | |
tree | 8bbcbd80cca85e455409d09b2392e0eb1edcef60 | |
parent | remove the bamboo build file, bamboo is dead, long live panda :) (diff) | |
download | opensim-SC_OLD-84602c9480a14e6397381ea40a387a609ada1dbf.zip opensim-SC_OLD-84602c9480a14e6397381ea40a387a609ada1dbf.tar.gz opensim-SC_OLD-84602c9480a14e6397381ea40a387a609ada1dbf.tar.bz2 opensim-SC_OLD-84602c9480a14e6397381ea40a387a609ada1dbf.tar.xz |
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.
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8e4a9d3..2552a3d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1596,11 +1596,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
1596 | SceneObjectPart rootpart = m_rootPart; | 1596 | SceneObjectPart rootpart = m_rootPart; |
1597 | if (rootpart != null) | 1597 | if (rootpart != null) |
1598 | { | 1598 | { |
1599 | if (rootpart.PhysActor != null) | 1599 | if (IsAttachment) |
1600 | { | 1600 | { |
1601 | rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z); | 1601 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); |
1602 | rootpart.PhysActor.PIDTau = tau; | 1602 | if (avatar != null) |
1603 | rootpart.PhysActor.PIDActive = true; | 1603 | { |
1604 | List<string> coords = new List<string>(); | ||
1605 | uint regionX = 0; | ||
1606 | uint regionY = 0; | ||
1607 | Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); | ||
1608 | target.X += regionX; | ||
1609 | target.Y += regionY; | ||
1610 | coords.Add(target.X.ToString()); | ||
1611 | coords.Add(target.Y.ToString()); | ||
1612 | coords.Add(target.Z.ToString()); | ||
1613 | avatar.DoMoveToPosition(avatar, "", coords); | ||
1614 | } | ||
1615 | } | ||
1616 | else | ||
1617 | { | ||
1618 | if (rootpart.PhysActor != null) | ||
1619 | { | ||
1620 | rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z); | ||
1621 | rootpart.PhysActor.PIDTau = tau; | ||
1622 | rootpart.PhysActor.PIDActive = true; | ||
1623 | } | ||
1604 | } | 1624 | } |
1605 | } | 1625 | } |
1606 | } | 1626 | } |