diff options
author | Oren Hurvitz | 2012-04-28 17:42:49 +0300 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-30 17:18:15 +0100 |
commit | fe8e835bfc027696979ff0fb3135e5b2718af9ed (patch) | |
tree | b68573726b4d2c3e2ec89f13355703576708afa1 /OpenSim | |
parent | If there are no new prim items to store then don't bother opening the MySqlCo... (diff) | |
download | opensim-SC_OLD-fe8e835bfc027696979ff0fb3135e5b2718af9ed.zip opensim-SC_OLD-fe8e835bfc027696979ff0fb3135e5b2718af9ed.tar.gz opensim-SC_OLD-fe8e835bfc027696979ff0fb3135e5b2718af9ed.tar.bz2 opensim-SC_OLD-fe8e835bfc027696979ff0fb3135e5b2718af9ed.tar.xz |
Fixed: scripted controls didn't work if the avatar was sitting down
This fixes a bug introduced in 6473674bbf6ce006512083902e8ff1796d8c8b22
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 64fe7a8..3cf7b2a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1336,6 +1336,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1336 | PhysicsActor actor = PhysicsActor; | 1336 | PhysicsActor actor = PhysicsActor; |
1337 | if (actor == null) | 1337 | if (actor == null) |
1338 | { | 1338 | { |
1339 | SafeSendControlsToScripts(flagsForScripts); | ||
1339 | return; | 1340 | return; |
1340 | } | 1341 | } |
1341 | 1342 | ||
@@ -1512,20 +1513,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1512 | if (update_movementflag && ParentID == 0) | 1513 | if (update_movementflag && ParentID == 0) |
1513 | Animator.UpdateMovementAnimations(); | 1514 | Animator.UpdateMovementAnimations(); |
1514 | 1515 | ||
1515 | lock (scriptedcontrols) | 1516 | SafeSendControlsToScripts(flagsForScripts); |
1516 | { | ||
1517 | if (scriptedcontrols.Count > 0) | ||
1518 | { | ||
1519 | // Notify the scripts only after calling UpdateMovementAnimations(), so that if a script | ||
1520 | // (e.g., a walking script) checks which animation is active it will be the correct animation. | ||
1521 | SendControlToScripts(flagsForScripts); | ||
1522 | } | ||
1523 | } | ||
1524 | } | 1517 | } |
1525 | 1518 | ||
1526 | m_scene.EventManager.TriggerOnClientMovement(this); | 1519 | m_scene.EventManager.TriggerOnClientMovement(this); |
1527 | } | 1520 | } |
1528 | 1521 | ||
1522 | private void SafeSendControlsToScripts(uint flagsForScripts) | ||
1523 | { | ||
1524 | lock (scriptedcontrols) | ||
1525 | { | ||
1526 | if (scriptedcontrols.Count > 0) | ||
1527 | { | ||
1528 | // Notify the scripts only after calling UpdateMovementAnimations(), so that if a script | ||
1529 | // (e.g., a walking script) checks which animation is active it will be the correct animation. | ||
1530 | SendControlToScripts(flagsForScripts); | ||
1531 | } | ||
1532 | } | ||
1533 | } | ||
1534 | |||
1529 | /// <summary> | 1535 | /// <summary> |
1530 | /// Calculate an update to move the presence to the set target. | 1536 | /// Calculate an update to move the presence to the set target. |
1531 | /// </summary> | 1537 | /// </summary> |