diff options
author | Justin Clark-Casey (justincc) | 2013-11-29 01:56:49 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-11-29 01:56:49 +0000 |
commit | 868c0c27469067d25add501569e5fb12f8a79c12 (patch) | |
tree | fb6b1eaf5f5b0dfba69048927db3be8abd3243b5 /OpenSim/Region/Framework | |
parent | Restore SP.AbsolutePosition to properly return actual absolute position when ... (diff) | |
download | opensim-SC_OLD-868c0c27469067d25add501569e5fb12f8a79c12.zip opensim-SC_OLD-868c0c27469067d25add501569e5fb12f8a79c12.tar.gz opensim-SC_OLD-868c0c27469067d25add501569e5fb12f8a79c12.tar.bz2 opensim-SC_OLD-868c0c27469067d25add501569e5fb12f8a79c12.tar.xz |
Fix regression where sitting on ground stopped working.
This was due to the PhysicsActor no longer being recreated on stand from ground.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a52263b..0fb5477 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2174,11 +2174,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2174 | { | 2174 | { |
2175 | // m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name); | 2175 | // m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name); |
2176 | 2176 | ||
2177 | bool satOnObject = IsSatOnObject; | ||
2178 | SceneObjectPart part = ParentPart; | ||
2177 | SitGround = false; | 2179 | SitGround = false; |
2178 | 2180 | ||
2179 | if (ParentID != 0) | 2181 | if (satOnObject) |
2180 | { | 2182 | { |
2181 | SceneObjectPart part = ParentPart; | ||
2182 | TaskInventoryDictionary taskIDict = part.TaskInventory; | 2183 | TaskInventoryDictionary taskIDict = part.TaskInventory; |
2183 | if (taskIDict != null) | 2184 | if (taskIDict != null) |
2184 | { | 2185 | { |
@@ -2238,19 +2239,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
2238 | Rotation = standRotation; | 2239 | Rotation = standRotation; |
2239 | AbsolutePosition = standPos; | 2240 | AbsolutePosition = standPos; |
2240 | ParentPosition = Vector3.Zero; | 2241 | ParentPosition = Vector3.Zero; |
2242 | } | ||
2241 | 2243 | ||
2242 | // We need to wait until we have calculated proper stand positions before sitting up the physical | 2244 | // We need to wait until we have calculated proper stand positions before sitting up the physical |
2243 | // avatar to avoid race conditions. | 2245 | // avatar to avoid race conditions. |
2244 | if (PhysicsActor == null) | 2246 | if (PhysicsActor == null) |
2245 | AddToPhysicalScene(false); | 2247 | AddToPhysicalScene(false); |
2246 | 2248 | ||
2249 | if (satOnObject) | ||
2250 | { | ||
2247 | SendAvatarDataToAllAgents(); | 2251 | SendAvatarDataToAllAgents(); |
2248 | m_requestedSitTargetID = 0; | 2252 | m_requestedSitTargetID = 0; |
2249 | 2253 | ||
2250 | part.RemoveSittingAvatar(UUID); | 2254 | part.RemoveSittingAvatar(UUID); |
2251 | 2255 | ||
2252 | if (part != null) | 2256 | part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); |
2253 | part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); | ||
2254 | } | 2257 | } |
2255 | 2258 | ||
2256 | Animator.TrySetMovementAnimation("STAND"); | 2259 | Animator.TrySetMovementAnimation("STAND"); |