aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDan Lake2011-10-06 12:39:19 -0700
committerDan Lake2011-10-06 12:39:19 -0700
commit9a16e76f5151c11fbf76e41b89f8eb03b1731828 (patch)
treef918219e6e3d716b904983db8042c309b165e325
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-9a16e76f5151c11fbf76e41b89f8eb03b1731828.zip
opensim-SC_OLD-9a16e76f5151c11fbf76e41b89f8eb03b1731828.tar.gz
opensim-SC_OLD-9a16e76f5151c11fbf76e41b89f8eb03b1731828.tar.bz2
opensim-SC_OLD-9a16e76f5151c11fbf76e41b89f8eb03b1731828.tar.xz
Simplified IsInTransit property on ScenePresence and removed InTransit() which called IsInTransit=true which called m_inTransit=true. Also removed NotInTransit().
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs21
2 files changed, 16 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8924c0a..083ee33 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -699,7 +699,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
699 } 699 }
700 else 700 else
701 { 701 {
702 agent.InTransit(); 702 agent.IsInTransit = true;
703 703
704 neighboury = b.TriggerRegionY; 704 neighboury = b.TriggerRegionY;
705 neighbourx = b.TriggerRegionX; 705 neighbourx = b.TriggerRegionX;
@@ -722,7 +722,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
722 } 722 }
723 else 723 else
724 { 724 {
725 agent.InTransit(); 725 agent.IsInTransit = true;
726 726
727 neighboury = ba.TriggerRegionY; 727 neighboury = ba.TriggerRegionY;
728 neighbourx = ba.TriggerRegionX; 728 neighbourx = ba.TriggerRegionX;
@@ -756,7 +756,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
756 } 756 }
757 else 757 else
758 { 758 {
759 agent.InTransit(); 759 agent.IsInTransit = true;
760 760
761 neighboury = ba.TriggerRegionY; 761 neighboury = ba.TriggerRegionY;
762 neighbourx = ba.TriggerRegionX; 762 neighbourx = ba.TriggerRegionX;
@@ -788,7 +788,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
788 } 788 }
789 else 789 else
790 { 790 {
791 agent.InTransit(); 791 agent.IsInTransit = true;
792 792
793 neighboury = b.TriggerRegionY; 793 neighboury = b.TriggerRegionY;
794 neighbourx = b.TriggerRegionX; 794 neighbourx = b.TriggerRegionX;
@@ -876,7 +876,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
876 return false; 876 return false;
877 } 877 }
878 878
879 agent.InTransit(); 879 agent.IsInTransit = true;
880 880
881 CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync; 881 CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync;
882 d.BeginInvoke(agent, newpos, neighbourx, neighboury, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); 882 d.BeginInvoke(agent, newpos, neighbourx, neighboury, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d);
@@ -1066,7 +1066,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1066 agent.RestoreInCurrentScene(); 1066 agent.RestoreInCurrentScene();
1067 1067
1068 // In any case 1068 // In any case
1069 agent.NotInTransit(); 1069 agent.IsInTransit = false;
1070 1070
1071 //m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); 1071 //m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname);
1072 } 1072 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index ce63946..e4e5f17 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -718,7 +718,16 @@ namespace OpenSim.Region.Framework.Scenes
718 public bool IsInTransit 718 public bool IsInTransit
719 { 719 {
720 get { return m_inTransit; } 720 get { return m_inTransit; }
721 private set { m_inTransit = value; } 721 set {
722 if(value)
723 {
724 if ((PhysicsActor != null) && PhysicsActor.Flying)
725 m_AgentControlFlags |= AgentManager.ControlFlags.AGENT_CONTROL_FLY;
726 else if ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0)
727 m_AgentControlFlags &= ~AgentManager.ControlFlags.AGENT_CONTROL_FLY;
728 }
729 m_inTransit = value;
730 }
722 } 731 }
723 732
724 private float m_speedModifier = 1.0f; 733 private float m_speedModifier = 1.0f;
@@ -2946,16 +2955,6 @@ namespace OpenSim.Region.Framework.Scenes
2946 } 2955 }
2947 } 2956 }
2948 2957
2949 public void InTransit()
2950 {
2951 IsInTransit = true;
2952
2953 if ((PhysicsActor != null) && PhysicsActor.Flying)
2954 m_AgentControlFlags |= AgentManager.ControlFlags.AGENT_CONTROL_FLY;
2955 else if ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0)
2956 m_AgentControlFlags &= ~AgentManager.ControlFlags.AGENT_CONTROL_FLY;
2957 }
2958
2959 public void NotInTransit() 2958 public void NotInTransit()
2960 { 2959 {
2961 IsInTransit = false; 2960 IsInTransit = false;