aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2014-08-12 20:37:34 +0100
committerUbitUmarov2014-08-12 20:37:34 +0100
commitc7e3e59953d68dd9428188f8a19f055a73bd333b (patch)
tree3072098cd3e45835ac0ff8fc6b2b8e4f4f69476d /OpenSim/Region
parent fix VS creative indentation (diff)
downloadopensim-SC-c7e3e59953d68dd9428188f8a19f055a73bd333b.zip
opensim-SC-c7e3e59953d68dd9428188f8a19f055a73bd333b.tar.gz
opensim-SC-c7e3e59953d68dd9428188f8a19f055a73bd333b.tar.bz2
opensim-SC-c7e3e59953d68dd9428188f8a19f055a73bd333b.tar.xz
try no send current LookAt, remove redundant incomplete position height
check
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs22
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 762dbd4..c49559a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1768,17 +1768,11 @@ namespace OpenSim.Region.Framework.Scenes
1768 return; 1768 return;
1769 } 1769 }
1770 1770
1771 Vector3 look = Velocity;
1772
1773 // if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
1774 if ((Math.Abs(look.X) < 0.1) && (Math.Abs(look.Y) < 0.1) && (Math.Abs(look.Z) < 0.1))
1775 {
1776 look = new Vector3(0.99f, 0.042f, 0);
1777 }
1778
1779 // Prevent teleporting to an underground location 1771 // Prevent teleporting to an underground location
1780 // (may crash client otherwise) 1772 // (may crash client otherwise)
1781 // 1773 //
1774
1775/* this is done in MakeRootAgent
1782 Vector3 pos = AbsolutePosition; 1776 Vector3 pos = AbsolutePosition;
1783 float ground = m_scene.GetGroundHeight(pos.X, pos.Y); 1777 float ground = m_scene.GetGroundHeight(pos.X, pos.Y);
1784 if (pos.Z < ground + 1.5f) 1778 if (pos.Z < ground + 1.5f)
@@ -1786,7 +1780,7 @@ namespace OpenSim.Region.Framework.Scenes
1786 pos.Z = ground + 1.5f; 1780 pos.Z = ground + 1.5f;
1787 AbsolutePosition = pos; 1781 AbsolutePosition = pos;
1788 } 1782 }
1789 1783*/
1790 bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); 1784 bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
1791 if (!MakeRootAgent(AbsolutePosition, flying)) 1785 if (!MakeRootAgent(AbsolutePosition, flying))
1792 { 1786 {
@@ -1797,6 +1791,16 @@ namespace OpenSim.Region.Framework.Scenes
1797 return; 1791 return;
1798 } 1792 }
1799 1793
1794 Vector3 look = Lookat;
1795 if ((Math.Abs(look.X) < 0.01) && (Math.Abs(look.Y) < 0.01))
1796 {
1797 look = Velocity;
1798 look.Z = 0;
1799 look = Util.GetNormalizedVector(look);
1800 if ((Math.Abs(look.X) < 0.01) && (Math.Abs(look.Y) < 0.01) )
1801 look = new Vector3(0.99f, 0.042f, 0);
1802 }
1803
1800 // Tell the client that we're totally ready 1804 // Tell the client that we're totally ready
1801 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); 1805 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
1802 1806