aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2016-10-05 13:17:23 +0100
committerUbitUmarov2016-10-05 13:17:23 +0100
commit8a3958ad048535ad4f8a752cbd71d9114e53a42b (patch)
tree111826405ab3795c1aece111bf4f2f08920fed68 /OpenSim/Region/Framework
parentminor cleanup (diff)
downloadopensim-SC_OLD-8a3958ad048535ad4f8a752cbd71d9114e53a42b.zip
opensim-SC_OLD-8a3958ad048535ad4f8a752cbd71d9114e53a42b.tar.gz
opensim-SC_OLD-8a3958ad048535ad4f8a752cbd71d9114e53a42b.tar.bz2
opensim-SC_OLD-8a3958ad048535ad4f8a752cbd71d9114e53a42b.tar.xz
dont let ignored AgentUpdates change their throttles. Apply respective movement to physics on the handling thread, not heartbeat, avoiding missing transitions that should get into physics. Make some usefull sp state flags visible everywhere
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs49
1 files changed, 33 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index bb6e89b..6f4d6c3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -281,7 +281,9 @@ namespace OpenSim.Region.Framework.Scenes
281 281
282 private bool m_followCamAuto = false; 282 private bool m_followCamAuto = false;
283 283
284 private Vector3? m_forceToApply; 284// private object m_forceToApplyLock = new object();
285// private bool m_forceToApplyValid;
286// private Vector3 m_forceToApply;
285 private int m_userFlags; 287 private int m_userFlags;
286 public int UserFlags 288 public int UserFlags
287 { 289 {
@@ -582,11 +584,11 @@ namespace OpenSim.Region.Framework.Scenes
582 { 584 {
583 get 585 get
584 { 586 {
585 return m_drawDistance; 587 return m_drawDistance;
586 } 588 }
587 set 589 set
588 { 590 {
589 m_drawDistance = Util.Clamp(value, 32f, m_scene.MaxDrawDistance); 591 m_drawDistance = Util.Clamp(value, 32f, m_scene.MaxDrawDistance);
590 } 592 }
591 } 593 }
592 594
@@ -594,7 +596,7 @@ namespace OpenSim.Region.Framework.Scenes
594 { 596 {
595 get 597 get
596 { 598 {
597 return Util.Clamp(m_drawDistance, 32f, m_scene.MaxRegionViewDistance); 599 return Util.Clamp(m_drawDistance, 32f, m_scene.MaxRegionViewDistance);
598 } 600 }
599 } 601 }
600 602
@@ -2120,6 +2122,7 @@ namespace OpenSim.Region.Framework.Scenes
2120 if (haveAnims) 2122 if (haveAnims)
2121 SendAnimPackToAgent(this, animIDs, animseqs, animsobjs); 2123 SendAnimPackToAgent(this, animIDs, animseqs, animsobjs);
2122 2124
2125
2123 // we should be able to receive updates, etc 2126 // we should be able to receive updates, etc
2124 // so release them 2127 // so release them
2125 m_inTransit = false; 2128 m_inTransit = false;
@@ -2238,6 +2241,9 @@ namespace OpenSim.Region.Framework.Scenes
2238 } 2241 }
2239 finally 2242 finally
2240 { 2243 {
2244 haveGroupInformation = false;
2245 gotCrossUpdate = false;
2246 crossingFlags = 0;
2241 m_inTransit = false; 2247 m_inTransit = false;
2242 } 2248 }
2243 // if hide force a check 2249 // if hide force a check
@@ -2247,9 +2253,6 @@ namespace OpenSim.Region.Framework.Scenes
2247 // m_currentParcelHide = newhide; 2253 // m_currentParcelHide = newhide;
2248 // } 2254 // }
2249 2255
2250 haveGroupInformation = false;
2251 gotCrossUpdate = false;
2252 crossingFlags = 0;
2253 2256
2254 m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd; 2257 m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd;
2255 2258
@@ -3006,7 +3009,8 @@ namespace OpenSim.Region.Framework.Scenes
3006 3009
3007 MovingToTarget = false; 3010 MovingToTarget = false;
3008// MoveToPositionTarget = Vector3.Zero; 3011// MoveToPositionTarget = Vector3.Zero;
3009 m_forceToApply = null; // cancel possible last action 3012// lock(m_forceToApplyLock)
3013// m_forceToApplyValid = false; // cancel possible last action
3010 3014
3011 // We need to reset the control flag as the ScenePresenceAnimator uses this to determine the correct 3015 // We need to reset the control flag as the ScenePresenceAnimator uses this to determine the correct
3012 // resting animation (e.g. hover or stand). NPCs don't have a client that will quickly reset this flag. 3016 // resting animation (e.g. hover or stand). NPCs don't have a client that will quickly reset this flag.
@@ -3638,8 +3642,14 @@ namespace OpenSim.Region.Framework.Scenes
3638 } 3642 }
3639 3643
3640 // m_log.DebugFormat("[SCENE PRESENCE]: Setting force to apply to {0} for {1}", direc, Name); 3644 // m_log.DebugFormat("[SCENE PRESENCE]: Setting force to apply to {0} for {1}", direc, Name);
3641 3645/*
3642 m_forceToApply = direc; 3646 lock(m_forceToApplyLock)
3647 {
3648 m_forceToApply = direc;
3649 m_forceToApplyValid = true;
3650 }
3651*/
3652 Velocity = direc;
3643 Animator.UpdateMovementAnimations(); 3653 Animator.UpdateMovementAnimations();
3644 } 3654 }
3645 3655
@@ -4734,17 +4744,21 @@ namespace OpenSim.Region.Framework.Scenes
4734 /// </summary> 4744 /// </summary>
4735 public void UpdateMovement() 4745 public void UpdateMovement()
4736 { 4746 {
4747/*
4737 if (IsInTransit) 4748 if (IsInTransit)
4738 return; 4749 return;
4739 if (m_forceToApply.HasValue)
4740 {
4741 Vector3 force = m_forceToApply.Value;
4742 4750
4743 Velocity = force; 4751 lock(m_forceToApplyLock)
4752 {
4753 if (m_forceToApplyValid)
4754 {
4755 Velocity = m_forceToApply;
4744 4756
4745 m_forceToApply = null; 4757 m_forceToApplyValid = false;
4746 TriggerScenePresenceUpdated(); 4758 TriggerScenePresenceUpdated();
4759 }
4747 } 4760 }
4761*/
4748 } 4762 }
4749 4763
4750 /// <summary> 4764 /// <summary>
@@ -4767,6 +4781,9 @@ namespace OpenSim.Region.Framework.Scenes
4767// Appearance.SetHeight(); 4781// Appearance.SetHeight();
4768 Appearance.SetSize(new Vector3(0.45f,0.6f,1.9f)); 4782 Appearance.SetSize(new Vector3(0.45f,0.6f,1.9f));
4769 4783
4784// lock(m_forceToApplyLock)
4785// m_forceToApplyValid = false;
4786
4770 PhysicsScene scene = m_scene.PhysicsScene; 4787 PhysicsScene scene = m_scene.PhysicsScene;
4771 Vector3 pVec = AbsolutePosition; 4788 Vector3 pVec = AbsolutePosition;
4772 4789