diff options
author | Justin Clark-Casey (justincc) | 2011-11-11 23:10:43 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-11 23:10:43 +0000 |
commit | 2a2cdaa211086b48c1a19f371b544e1550500e33 (patch) | |
tree | 07248541b594d0a48167213cdf55d5a1abaed3f7 /OpenSim/Region/Framework/Scenes | |
parent | Restore sending of OutPacket() for object kills removed in commit c7dd7b1. (diff) | |
download | opensim-SC-2a2cdaa211086b48c1a19f371b544e1550500e33.zip opensim-SC-2a2cdaa211086b48c1a19f371b544e1550500e33.tar.gz opensim-SC-2a2cdaa211086b48c1a19f371b544e1550500e33.tar.bz2 opensim-SC-2a2cdaa211086b48c1a19f371b544e1550500e33.tar.xz |
As with prim sitting avatars, make an avatar phantom when it sits on the ground and solid again when it stands.
This is to avoid http://opensimulator.org/mantis/view.php?id=5783 when a collision with a ground sitting avatar causes that avatar to automatically stand and sometimes not be able to move
A better solution may be to keep gound sitting avatars solid but remove their collision status. However, this requires some physics code work.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0c20045..f5a7f02 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1419,6 +1419,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1419 | // to use. Or we could add a m_isSitting variable. | 1419 | // to use. Or we could add a m_isSitting variable. |
1420 | //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); | 1420 | //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); |
1421 | SitGround = true; | 1421 | SitGround = true; |
1422 | RemoveFromPhysicalScene(); | ||
1422 | } | 1423 | } |
1423 | 1424 | ||
1424 | // In the future, these values might need to go global. | 1425 | // In the future, these values might need to go global. |
@@ -1835,11 +1836,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1835 | /// </summary> | 1836 | /// </summary> |
1836 | public void StandUp() | 1837 | public void StandUp() |
1837 | { | 1838 | { |
1839 | // m_log.DebugFormat("[SCENE PRESENCE]: StandUp() for {0}", Name); | ||
1840 | |||
1838 | SitGround = false; | 1841 | SitGround = false; |
1842 | if (PhysicsActor == null) | ||
1843 | AddToPhysicalScene(false); | ||
1839 | 1844 | ||
1840 | if (ParentID != 0) | 1845 | if (ParentID != 0) |
1841 | { | 1846 | { |
1842 | // m_log.Debug("StandupCode Executed"); | ||
1843 | SceneObjectPart part = m_scene.GetSceneObjectPart(ParentID); | 1847 | SceneObjectPart part = m_scene.GetSceneObjectPart(ParentID); |
1844 | if (part != null) | 1848 | if (part != null) |
1845 | { | 1849 | { |
@@ -1866,11 +1870,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1866 | ControllingClient.SendClearFollowCamProperties(part.ParentUUID); | 1870 | ControllingClient.SendClearFollowCamProperties(part.ParentUUID); |
1867 | } | 1871 | } |
1868 | 1872 | ||
1869 | if (PhysicsActor == null) | ||
1870 | { | ||
1871 | AddToPhysicalScene(false); | ||
1872 | } | ||
1873 | |||
1874 | m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); | 1873 | m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); |
1875 | ParentPosition = Vector3.Zero; | 1874 | ParentPosition = Vector3.Zero; |
1876 | 1875 | ||