aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-11 23:28:32 +0000
committerJustin Clark-Casey (justincc)2011-11-11 23:28:32 +0000
commita3052e40ad9ae56d5e968af9792e0ff8b905e9b9 (patch)
tree3705415da5fae40295ebba1d2aa1f5fd6b8843bf /OpenSim/Region/Framework
parentPick up the intended ConsolePrompt from [Startup] instead of console_prompt. (diff)
downloadopensim-SC_OLD-a3052e40ad9ae56d5e968af9792e0ff8b905e9b9.zip
opensim-SC_OLD-a3052e40ad9ae56d5e968af9792e0ff8b905e9b9.tar.gz
opensim-SC_OLD-a3052e40ad9ae56d5e968af9792e0ff8b905e9b9.tar.bz2
opensim-SC_OLD-a3052e40ad9ae56d5e968af9792e0ff8b905e9b9.tar.xz
extract ground sit code into SP.HandleAgentSitOnGround() for consistency with other sitting code.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs31
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f5a7f02..3fee642 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -163,7 +163,11 @@ namespace OpenSim.Region.Framework.Scenes
163 163
164 private uint m_requestedSitTargetID; 164 private uint m_requestedSitTargetID;
165 private UUID m_requestedSitTargetUUID; 165 private UUID m_requestedSitTargetUUID;
166 public bool SitGround = false; 166
167 /// <summary>
168 /// Are we sitting on the ground?
169 /// </summary>
170 public bool SitGround { get; private set; }
167 171
168 private SendCourseLocationsMethod m_sendCourseLocationsMethod; 172 private SendCourseLocationsMethod m_sendCourseLocationsMethod;
169 173
@@ -1410,17 +1414,7 @@ namespace OpenSim.Region.Framework.Scenes
1410 } 1414 }
1411 1415
1412 if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0) 1416 if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0)
1413 { 1417 HandleAgentSitOnGround();
1414 m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
1415 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
1416
1417 // TODO: This doesn't prevent the user from walking yet.
1418 // Setting parent ID would fix this, if we knew what value
1419 // to use. Or we could add a m_isSitting variable.
1420 //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
1421 SitGround = true;
1422 RemoveFromPhysicalScene();
1423 }
1424 1418
1425 // In the future, these values might need to go global. 1419 // In the future, these values might need to go global.
1426 // Here's where you get them. 1420 // Here's where you get them.
@@ -2314,6 +2308,19 @@ namespace OpenSim.Region.Framework.Scenes
2314 SendAvatarDataToAllAgents(); 2308 SendAvatarDataToAllAgents();
2315 } 2309 }
2316 2310
2311 public void HandleAgentSitOnGround()
2312 {
2313 m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
2314 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
2315
2316 // TODO: This doesn't prevent the user from walking yet.
2317 // Setting parent ID would fix this, if we knew what value
2318 // to use. Or we could add a m_isSitting variable.
2319 //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
2320 SitGround = true;
2321 RemoveFromPhysicalScene();
2322 }
2323
2317 /// <summary> 2324 /// <summary>
2318 /// Event handler for the 'Always run' setting on the client 2325 /// Event handler for the 'Always run' setting on the client
2319 /// Tells the physics plugin to increase speed of movement. 2326 /// Tells the physics plugin to increase speed of movement.