aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie2012-04-27 22:28:09 +0100
committerMelanie2012-04-27 22:28:09 +0100
commitdcbcbd697f70d361b63d502512d2731e0ee6e046 (patch)
tree8168b0dc214e9cb710b0972d5f03a7da3164189b /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge branch 'master' into careminster (diff)
parentFix prebuild.xml (diff)
downloadopensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.zip
opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.tar.gz
opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.tar.bz2
opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs33
1 files changed, 19 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e0d5055..311ba6a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -45,6 +45,7 @@ using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
45 45
46namespace OpenSim.Region.Framework.Scenes 46namespace OpenSim.Region.Framework.Scenes
47{ 47{
48 [Flags]
48 enum ScriptControlled : uint 49 enum ScriptControlled : uint
49 { 50 {
50 CONTROL_ZERO = 0, 51 CONTROL_ZERO = 0,
@@ -1295,7 +1296,7 @@ namespace OpenSim.Region.Framework.Scenes
1295 { 1296 {
1296// m_log.DebugFormat( 1297// m_log.DebugFormat(
1297// "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}", 1298// "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}",
1298// Scene.RegionInfo.RegionName, remoteClient.Name, agentData.ControlFlags); 1299// Scene.RegionInfo.RegionName, remoteClient.Name, (AgentManager.ControlFlags)agentData.ControlFlags);
1299 1300
1300 if (IsChildAgent) 1301 if (IsChildAgent)
1301 { 1302 {
@@ -1405,14 +1406,8 @@ namespace OpenSim.Region.Framework.Scenes
1405 } 1406 }
1406 } 1407 }
1407 1408
1408 lock (scriptedcontrols) 1409 uint flagsForScripts = (uint)flags;
1409 { 1410 flags = RemoveIgnoredControls(flags, IgnoredControls);
1410 if (scriptedcontrols.Count > 0)
1411 {
1412 SendControlToScripts((uint)flags);
1413 flags = RemoveIgnoredControls(flags, IgnoredControls);
1414 }
1415 }
1416 1411
1417 if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0) 1412 if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0)
1418 HandleAgentSitOnGround(); 1413 HandleAgentSitOnGround();
@@ -1505,7 +1500,7 @@ namespace OpenSim.Region.Framework.Scenes
1505 MovementFlag |= (byte)nudgehack; 1500 MovementFlag |= (byte)nudgehack;
1506 } 1501 }
1507 1502
1508// m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); 1503 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF);
1509 MovementFlag += (byte)(uint)DCF; 1504 MovementFlag += (byte)(uint)DCF;
1510 update_movementflag = true; 1505 update_movementflag = true;
1511 } 1506 }
@@ -1518,7 +1513,7 @@ namespace OpenSim.Region.Framework.Scenes
1518 && ((MovementFlag & (byte)nudgehack) == nudgehack)) 1513 && ((MovementFlag & (byte)nudgehack) == nudgehack))
1519 ) // This or is for Nudge forward 1514 ) // This or is for Nudge forward
1520 { 1515 {
1521// m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with lack of {1}", Name, DCF); 1516 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with lack of {1}", Name, DCF);
1522 MovementFlag -= ((byte)(uint)DCF); 1517 MovementFlag -= ((byte)(uint)DCF);
1523 update_movementflag = true; 1518 update_movementflag = true;
1524 1519
@@ -1599,8 +1594,18 @@ namespace OpenSim.Region.Framework.Scenes
1599// } 1594// }
1600// } 1595// }
1601 1596
1602// if (update_movementflag && ParentID == 0) 1597 if (update_movementflag && ParentID == 0)
1603// Animator.UpdateMovementAnimations(); 1598 Animator.UpdateMovementAnimations();
1599
1600 lock (scriptedcontrols)
1601 {
1602 if (scriptedcontrols.Count > 0)
1603 {
1604 // Notify the scripts only after calling UpdateMovementAnimations(), so that if a script
1605 // (e.g., a walking script) checks which animation is active it will be the correct animation.
1606 SendControlToScripts(flagsForScripts);
1607 }
1608 }
1604 } 1609 }
1605 1610
1606 m_scene.EventManager.TriggerOnClientMovement(this); 1611 m_scene.EventManager.TriggerOnClientMovement(this);