diff options
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 |
3 files changed, 35 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 05cdf61..4cf854e 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -180,12 +180,17 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
180 | bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG); | 180 | bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG); |
181 | bool heldLeft = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS); | 181 | bool heldLeft = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS); |
182 | bool heldRight = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG); | 182 | bool heldRight = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG); |
183 | //bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; | 183 | bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; |
184 | //bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; | 184 | bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; |
185 | bool heldUp = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == AgentManager.ControlFlags.AGENT_CONTROL_UP_POS; | 185 | bool heldUp = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == AgentManager.ControlFlags.AGENT_CONTROL_UP_POS; |
186 | bool heldDown = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG; | 186 | bool heldDown = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG; |
187 | //bool flying = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) == AgentManager.ControlFlags.AGENT_CONTROL_FLY; | 187 | //bool flying = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) == AgentManager.ControlFlags.AGENT_CONTROL_FLY; |
188 | //bool mouselook = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) == AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK; | 188 | //bool mouselook = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) == AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK; |
189 | if (heldForward || heldBack || heldLeft || heldRight || heldUp || heldDown) | ||
190 | { | ||
191 | heldTurnLeft = false; | ||
192 | heldTurnRight = false; | ||
193 | } | ||
189 | 194 | ||
190 | // Direction in which the avatar is trying to move | 195 | // Direction in which the avatar is trying to move |
191 | Vector3 move = Vector3.Zero; | 196 | Vector3 move = Vector3.Zero; |
@@ -363,10 +368,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
363 | // Not walking | 368 | // Not walking |
364 | if (move.Z < 0) | 369 | if (move.Z < 0) |
365 | return "CROUCH"; | 370 | return "CROUCH"; |
366 | // else if (heldTurnLeft) | 371 | else if (heldTurnLeft) |
367 | // return "TURNLEFT"; | 372 | return "TURNLEFT"; |
368 | // else if (heldTurnRight) | 373 | else if (heldTurnRight) |
369 | // return "TURNRIGHT"; | 374 | return "TURNRIGHT"; |
370 | else | 375 | else |
371 | return "STAND"; | 376 | return "STAND"; |
372 | } | 377 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index b2e5dc3..743fd50 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1661,6 +1661,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1661 | /// <param name="childPrims"></param> | 1661 | /// <param name="childPrims"></param> |
1662 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) | 1662 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) |
1663 | { | 1663 | { |
1664 | SceneObjectGroup parentGroup = root.ParentGroup; | ||
1665 | if (parentGroup == null) return; | ||
1666 | |||
1667 | // Cowardly refuse to link to a group owned root | ||
1668 | if (parentGroup.OwnerID == parentGroup.GroupID) | ||
1669 | return; | ||
1670 | |||
1664 | Monitor.Enter(m_updateLock); | 1671 | Monitor.Enter(m_updateLock); |
1665 | try | 1672 | try |
1666 | { | 1673 | { |
@@ -1683,11 +1690,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1683 | 1690 | ||
1684 | foreach (SceneObjectGroup child in childGroups) | 1691 | foreach (SceneObjectGroup child in childGroups) |
1685 | { | 1692 | { |
1686 | parentGroup.LinkToGroup(child); | 1693 | if (parentGroup.OwnerID == child.OwnerID) |
1694 | { | ||
1695 | parentGroup.LinkToGroup(child); | ||
1687 | 1696 | ||
1688 | // this is here so physics gets updated! | 1697 | // this is here so physics gets updated! |
1689 | // Don't remove! Bad juju! Stay away! or fix physics! | 1698 | // Don't remove! Bad juju! Stay away! or fix physics! |
1690 | child.AbsolutePosition = child.AbsolutePosition; | 1699 | child.AbsolutePosition = child.AbsolutePosition; |
1700 | } | ||
1691 | } | 1701 | } |
1692 | 1702 | ||
1693 | // We need to explicitly resend the newly link prim's object properties since no other actions | 1703 | // We need to explicitly resend the newly link prim's object properties since no other actions |
@@ -1725,9 +1735,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1725 | if (part.ParentGroup.PrimCount != 1) // Skip single | 1735 | if (part.ParentGroup.PrimCount != 1) // Skip single |
1726 | { | 1736 | { |
1727 | if (part.LinkNum < 2) // Root | 1737 | if (part.LinkNum < 2) // Root |
1738 | { | ||
1728 | rootParts.Add(part); | 1739 | rootParts.Add(part); |
1740 | } | ||
1729 | else | 1741 | else |
1742 | { | ||
1743 | part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID; | ||
1730 | childParts.Add(part); | 1744 | childParts.Add(part); |
1745 | } | ||
1731 | 1746 | ||
1732 | SceneObjectGroup group = part.ParentGroup; | 1747 | SceneObjectGroup group = part.ParentGroup; |
1733 | if (!affectedGroups.Contains(group)) | 1748 | if (!affectedGroups.Contains(group)) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e662492..fdf944b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1387,6 +1387,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1387 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0) | 1387 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0) |
1388 | m_updateCount = UPDATE_COUNT; | 1388 | m_updateCount = UPDATE_COUNT; |
1389 | 1389 | ||
1390 | // Make turning in place work | ||
1391 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0 || | ||
1392 | (flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) | ||
1393 | m_updateCount = UPDATE_COUNT; | ||
1394 | |||
1390 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) | 1395 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) |
1391 | { | 1396 | { |
1392 | StandUp(); | 1397 | StandUp(); |