diff options
author | Justin Clark-Casey (justincc) | 2012-01-07 00:29:55 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-07 00:29:55 +0000 |
commit | ba163ab05b2f05bf9a316a5f209f64992d4f9a22 (patch) | |
tree | 770928ee948a8d3e2e319eef1b5000c7f6c6e23b /OpenSim | |
parent | Fix bug where tapping home to stop falling would stop any avatar movement oth... (diff) | |
download | opensim-SC-ba163ab05b2f05bf9a316a5f209f64992d4f9a22.zip opensim-SC-ba163ab05b2f05bf9a316a5f209f64992d4f9a22.tar.gz opensim-SC-ba163ab05b2f05bf9a316a5f209f64992d4f9a22.tar.bz2 opensim-SC-ba163ab05b2f05bf9a316a5f209f64992d4f9a22.tar.xz |
Add method doc to SPA.Falling and use automatic private get property
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index ff5f731..3584cda 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -61,11 +61,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
61 | public bool m_jumping = false; | 61 | public bool m_jumping = false; |
62 | public float m_jumpVelocity = 0f; | 62 | public float m_jumpVelocity = 0f; |
63 | // private int m_landing = 0; | 63 | // private int m_landing = 0; |
64 | public bool Falling | 64 | |
65 | { | 65 | /// <summary> |
66 | get { return m_falling; } | 66 | /// Is the avatar falling? |
67 | } | 67 | /// </summary> |
68 | private bool m_falling = false; | 68 | public bool Falling { get; private set; } |
69 | |||
69 | private float m_fallHeight; | 70 | private float m_fallHeight; |
70 | 71 | ||
71 | /// <value> | 72 | /// <value> |
@@ -223,7 +224,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
223 | m_animTickFall = 0; | 224 | m_animTickFall = 0; |
224 | m_animTickJump = 0; | 225 | m_animTickJump = 0; |
225 | m_jumping = false; | 226 | m_jumping = false; |
226 | m_falling = false; | 227 | Falling = false; |
227 | m_jumpVelocity = 0f; | 228 | m_jumpVelocity = 0f; |
228 | actor.Selected = false; | 229 | actor.Selected = false; |
229 | m_fallHeight = actor.Position.Z; // save latest flying height | 230 | m_fallHeight = actor.Position.Z; // save latest flying height |
@@ -259,7 +260,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
259 | float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f; | 260 | float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f; |
260 | 261 | ||
261 | if (!m_jumping && (fallVelocity < -3.0f)) | 262 | if (!m_jumping && (fallVelocity < -3.0f)) |
262 | m_falling = true; | 263 | Falling = true; |
263 | 264 | ||
264 | if (m_animTickFall == 0 || (fallVelocity >= 0.0f)) | 265 | if (m_animTickFall == 0 || (fallVelocity >= 0.0f)) |
265 | { | 266 | { |
@@ -289,7 +290,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
289 | // Start jumping, prejump | 290 | // Start jumping, prejump |
290 | m_animTickFall = 0; | 291 | m_animTickFall = 0; |
291 | m_jumping = true; | 292 | m_jumping = true; |
292 | m_falling = false; | 293 | Falling = false; |
293 | actor.Selected = true; // borrowed for jumping flag | 294 | actor.Selected = true; // borrowed for jumping flag |
294 | m_animTickJump = Environment.TickCount; | 295 | m_animTickJump = Environment.TickCount; |
295 | m_jumpVelocity = 0.35f; | 296 | m_jumpVelocity = 0.35f; |
@@ -302,7 +303,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
302 | { | 303 | { |
303 | // end jumping | 304 | // end jumping |
304 | m_jumping = false; | 305 | m_jumping = false; |
305 | m_falling = false; | 306 | Falling = false; |
306 | actor.Selected = false; // borrowed for jumping flag | 307 | actor.Selected = false; // borrowed for jumping flag |
307 | m_jumpVelocity = 0f; | 308 | m_jumpVelocity = 0f; |
308 | m_animTickFall = Environment.TickCount; | 309 | m_animTickFall = Environment.TickCount; |
@@ -329,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
329 | 330 | ||
330 | if (CurrentMovementAnimation == "FALLDOWN") | 331 | if (CurrentMovementAnimation == "FALLDOWN") |
331 | { | 332 | { |
332 | m_falling = false; | 333 | Falling = false; |
333 | m_animTickFall = Environment.TickCount; | 334 | m_animTickFall = Environment.TickCount; |
334 | // TODO: SOFT_LAND support | 335 | // TODO: SOFT_LAND support |
335 | float fallHeight = m_fallHeight - actor.Position.Z; | 336 | float fallHeight = m_fallHeight - actor.Position.Z; |
@@ -363,7 +364,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
363 | if (move.X != 0f || move.Y != 0f) | 364 | if (move.X != 0f || move.Y != 0f) |
364 | { | 365 | { |
365 | m_fallHeight = actor.Position.Z; // save latest flying height | 366 | m_fallHeight = actor.Position.Z; // save latest flying height |
366 | m_falling = false; | 367 | Falling = false; |
367 | // Walking / crouchwalking / running | 368 | // Walking / crouchwalking / running |
368 | if (move.Z < 0f) | 369 | if (move.Z < 0f) |
369 | return "CROUCHWALK"; | 370 | return "CROUCHWALK"; |
@@ -374,7 +375,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
374 | } | 375 | } |
375 | else if (!m_jumping) | 376 | else if (!m_jumping) |
376 | { | 377 | { |
377 | m_falling = false; | 378 | Falling = false; |
378 | // Not walking | 379 | // Not walking |
379 | if (move.Z < 0) | 380 | if (move.Z < 0) |
380 | return "CROUCH"; | 381 | return "CROUCH"; |
@@ -387,7 +388,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
387 | } | 388 | } |
388 | #endregion Ground Movement | 389 | #endregion Ground Movement |
389 | 390 | ||
390 | m_falling = false; | 391 | Falling = false; |
391 | 392 | ||
392 | return CurrentMovementAnimation; | 393 | return CurrentMovementAnimation; |
393 | } | 394 | } |