diff options
author | UbitUmarov | 2019-05-03 00:39:55 +0100 |
---|---|---|
committer | UbitUmarov | 2019-05-03 00:39:55 +0100 |
commit | 3ae4115e4390eab1391b74ba82792dc5df9dac1e (patch) | |
tree | 5eb3537aad4cac247d4fe8cb321dd3bd337257f8 | |
parent | soem cleanup (diff) | |
download | opensim-SC-3ae4115e4390eab1391b74ba82792dc5df9dac1e.zip opensim-SC-3ae4115e4390eab1391b74ba82792dc5df9dac1e.tar.gz opensim-SC-3ae4115e4390eab1391b74ba82792dc5df9dac1e.tar.bz2 opensim-SC-3ae4115e4390eab1391b74ba82792dc5df9dac1e.tar.xz |
osLocalTeleportAgent: if lookat or fly options, just move the avatar, not telling viewer about any teleport
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b12bb45..f569d21 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1776,38 +1776,43 @@ namespace OpenSim.Region.Framework.Scenes | |||
1776 | if (newpos.Z < posZLimit) | 1776 | if (newpos.Z < posZLimit) |
1777 | newpos.Z = posZLimit; | 1777 | newpos.Z = posZLimit; |
1778 | 1778 | ||
1779 | if ((flags & 8) != 0) | 1779 | if((flags & 0x1e) != 0) |
1780 | Flying = true; | 1780 | { |
1781 | else if ((flags & 16) != 0) | 1781 | if ((flags & 8) != 0) |
1782 | Flying = false; | 1782 | Flying = true; |
1783 | else if ((flags & 16) != 0) | ||
1784 | Flying = false; | ||
1783 | 1785 | ||
1784 | uint tpflags = (uint)TeleportFlags.ViaLocation; | 1786 | uint tpflags = (uint)TeleportFlags.ViaLocation; |
1785 | if(Flying) | 1787 | if(Flying) |
1786 | tpflags |= (uint)TeleportFlags.IsFlying; | 1788 | tpflags |= (uint)TeleportFlags.IsFlying; |
1787 | 1789 | ||
1788 | Vector3 lookat = Lookat; | 1790 | Vector3 lookat = Lookat; |
1789 | 1791 | ||
1790 | if ((flags & 2) != 0) | 1792 | if ((flags & 2) != 0) |
1791 | { | 1793 | { |
1792 | newlookat.Z = 0; | 1794 | newlookat.Z = 0; |
1793 | newlookat.Normalize(); | 1795 | newlookat.Normalize(); |
1794 | if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001) | 1796 | if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001) |
1795 | lookat = newlookat; | 1797 | lookat = newlookat; |
1796 | } | 1798 | } |
1797 | else if((flags & 4) != 0) | 1799 | else if((flags & 4) != 0) |
1798 | { | 1800 | { |
1799 | if((flags & 1) != 0) | 1801 | if((flags & 1) != 0) |
1800 | newlookat = newvel; | 1802 | newlookat = newvel; |
1801 | else | 1803 | else |
1802 | newlookat = m_velocity; | 1804 | newlookat = m_velocity; |
1803 | newlookat.Z = 0; | 1805 | newlookat.Z = 0; |
1804 | newlookat.Normalize(); | 1806 | newlookat.Normalize(); |
1805 | if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001) | 1807 | if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001) |
1806 | lookat = newlookat; | 1808 | lookat = newlookat; |
1807 | } | 1809 | } |
1808 | 1810 | ||
1809 | AbsolutePosition = newpos; | 1811 | AbsolutePosition = newpos; |
1810 | ControllingClient.SendLocalTeleport(newpos, lookat, tpflags); | 1812 | ControllingClient.SendLocalTeleport(newpos, lookat, tpflags); |
1813 | } | ||
1814 | else | ||
1815 | AbsolutePosition = newpos; | ||
1811 | 1816 | ||
1812 | if ((flags & 1) != 0) | 1817 | if ((flags & 1) != 0) |
1813 | { | 1818 | { |