diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a9195f7..1d6898b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -216,8 +216,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
216 | 216 | ||
217 | private Quaternion m_headrotation = Quaternion.Identity; | 217 | private Quaternion m_headrotation = Quaternion.Identity; |
218 | 218 | ||
219 | private string m_nextSitAnimation = String.Empty; | ||
220 | |||
221 | //PauPaw:Proper PID Controler for autopilot************ | 219 | //PauPaw:Proper PID Controler for autopilot************ |
222 | public bool MovingToTarget { get; private set; } | 220 | public bool MovingToTarget { get; private set; } |
223 | public Vector3 MoveToPositionTarget { get; private set; } | 221 | public Vector3 MoveToPositionTarget { get; private set; } |
@@ -591,18 +589,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
591 | set | 589 | set |
592 | { | 590 | { |
593 | m_bodyRot = value; | 591 | m_bodyRot = value; |
594 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, m_bodyRot); | ||
595 | if (PhysicsActor != null) | 592 | if (PhysicsActor != null) |
596 | { | 593 | { |
597 | try | 594 | try |
598 | { | 595 | { |
599 | PhysicsActor.Orientation = value; | 596 | PhysicsActor.Orientation = m_bodyRot; |
600 | } | 597 | } |
601 | catch (Exception e) | 598 | catch (Exception e) |
602 | { | 599 | { |
603 | m_log.Error("[SCENE PRESENCE]: Orientation " + e.Message); | 600 | m_log.Error("[SCENE PRESENCE]: Orientation " + e.Message); |
604 | } | 601 | } |
605 | } | 602 | } |
603 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, m_bodyRot); | ||
606 | } | 604 | } |
607 | } | 605 | } |
608 | 606 | ||
@@ -2202,25 +2200,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2202 | StandUp(); | 2200 | StandUp(); |
2203 | } | 2201 | } |
2204 | 2202 | ||
2205 | // if (!String.IsNullOrEmpty(sitAnimation)) | ||
2206 | // { | ||
2207 | // m_nextSitAnimation = sitAnimation; | ||
2208 | // } | ||
2209 | // else | ||
2210 | // { | ||
2211 | m_nextSitAnimation = "SIT"; | ||
2212 | // } | ||
2213 | |||
2214 | //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); | ||
2215 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); | 2203 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); |
2216 | 2204 | ||
2217 | if (part != null) | 2205 | if (part != null) |
2218 | { | 2206 | { |
2219 | if (!String.IsNullOrEmpty(part.SitAnimation)) | ||
2220 | { | ||
2221 | m_nextSitAnimation = part.SitAnimation; | ||
2222 | } | ||
2223 | |||
2224 | m_requestedSitTargetID = part.LocalId; | 2207 | m_requestedSitTargetID = part.LocalId; |
2225 | m_requestedSitTargetUUID = targetID; | 2208 | m_requestedSitTargetUUID = targetID; |
2226 | 2209 | ||
@@ -2341,18 +2324,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2341 | 2324 | ||
2342 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) | 2325 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) |
2343 | { | 2326 | { |
2344 | if (!String.IsNullOrEmpty(m_nextSitAnimation)) | ||
2345 | { | ||
2346 | HandleAgentSit(remoteClient, agentID, m_nextSitAnimation); | ||
2347 | } | ||
2348 | else | ||
2349 | { | ||
2350 | HandleAgentSit(remoteClient, agentID, "SIT"); | ||
2351 | } | ||
2352 | } | ||
2353 | |||
2354 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID, string sitAnimation) | ||
2355 | { | ||
2356 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); | 2327 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); |
2357 | 2328 | ||
2358 | if (part != null) | 2329 | if (part != null) |
@@ -2425,7 +2396,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2425 | 2396 | ||
2426 | Velocity = Vector3.Zero; | 2397 | Velocity = Vector3.Zero; |
2427 | RemoveFromPhysicalScene(); | 2398 | RemoveFromPhysicalScene(); |
2428 | 2399 | ||
2400 | String sitAnimation = "SIT"; | ||
2401 | if (!String.IsNullOrEmpty(part.SitAnimation)) | ||
2402 | { | ||
2403 | sitAnimation = part.SitAnimation; | ||
2404 | } | ||
2429 | Animator.TrySetMovementAnimation(sitAnimation); | 2405 | Animator.TrySetMovementAnimation(sitAnimation); |
2430 | SendAvatarDataToAllAgents(); | 2406 | SendAvatarDataToAllAgents(); |
2431 | } | 2407 | } |