diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7f07d73..1250a11 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -214,8 +214,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
214 | 214 | ||
215 | private Quaternion m_headrotation = Quaternion.Identity; | 215 | private Quaternion m_headrotation = Quaternion.Identity; |
216 | 216 | ||
217 | private string m_nextSitAnimation = String.Empty; | ||
218 | |||
219 | //PauPaw:Proper PID Controler for autopilot************ | 217 | //PauPaw:Proper PID Controler for autopilot************ |
220 | public bool MovingToTarget { get; private set; } | 218 | public bool MovingToTarget { get; private set; } |
221 | public Vector3 MoveToPositionTarget { get; private set; } | 219 | public Vector3 MoveToPositionTarget { get; private set; } |
@@ -2120,25 +2118,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2120 | StandUp(); | 2118 | StandUp(); |
2121 | } | 2119 | } |
2122 | 2120 | ||
2123 | // if (!String.IsNullOrEmpty(sitAnimation)) | ||
2124 | // { | ||
2125 | // m_nextSitAnimation = sitAnimation; | ||
2126 | // } | ||
2127 | // else | ||
2128 | // { | ||
2129 | m_nextSitAnimation = "SIT"; | ||
2130 | // } | ||
2131 | |||
2132 | //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); | ||
2133 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); | 2121 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); |
2134 | 2122 | ||
2135 | if (part != null) | 2123 | if (part != null) |
2136 | { | 2124 | { |
2137 | if (!String.IsNullOrEmpty(part.SitAnimation)) | ||
2138 | { | ||
2139 | m_nextSitAnimation = part.SitAnimation; | ||
2140 | } | ||
2141 | |||
2142 | m_requestedSitTargetID = part.LocalId; | 2125 | m_requestedSitTargetID = part.LocalId; |
2143 | m_requestedSitTargetUUID = targetID; | 2126 | m_requestedSitTargetUUID = targetID; |
2144 | 2127 | ||
@@ -2353,18 +2336,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2353 | 2336 | ||
2354 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) | 2337 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) |
2355 | { | 2338 | { |
2356 | if (!String.IsNullOrEmpty(m_nextSitAnimation)) | ||
2357 | { | ||
2358 | HandleAgentSit(remoteClient, agentID, m_nextSitAnimation); | ||
2359 | } | ||
2360 | else | ||
2361 | { | ||
2362 | HandleAgentSit(remoteClient, agentID, "SIT"); | ||
2363 | } | ||
2364 | } | ||
2365 | |||
2366 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID, string sitAnimation) | ||
2367 | { | ||
2368 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); | 2339 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); |
2369 | 2340 | ||
2370 | if (part != null) | 2341 | if (part != null) |
@@ -2436,7 +2407,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2436 | 2407 | ||
2437 | Velocity = Vector3.Zero; | 2408 | Velocity = Vector3.Zero; |
2438 | RemoveFromPhysicalScene(); | 2409 | RemoveFromPhysicalScene(); |
2439 | 2410 | ||
2411 | String sitAnimation = "SIT"; | ||
2412 | if (!String.IsNullOrEmpty(part.SitAnimation)) | ||
2413 | { | ||
2414 | sitAnimation = part.SitAnimation; | ||
2415 | } | ||
2440 | Animator.TrySetMovementAnimation(sitAnimation); | 2416 | Animator.TrySetMovementAnimation(sitAnimation); |
2441 | SendAvatarDataToAllAgents(); | 2417 | SendAvatarDataToAllAgents(); |
2442 | } | 2418 | } |