diff options
author | Melanie | 2010-11-05 14:46:13 +0100 |
---|---|---|
committer | Melanie | 2010-11-05 14:46:13 +0100 |
commit | 78448720671e364862ae5c17464ccf112bbf7034 (patch) | |
tree | 2bb72dc01006c585d981ceefbf05c888ea947823 /OpenSim | |
parent | Revert "Spin the AddNewClient process off into a new thread to avoid locking ... (diff) | |
download | opensim-SC_OLD-78448720671e364862ae5c17464ccf112bbf7034.zip opensim-SC_OLD-78448720671e364862ae5c17464ccf112bbf7034.tar.gz opensim-SC_OLD-78448720671e364862ae5c17464ccf112bbf7034.tar.bz2 opensim-SC_OLD-78448720671e364862ae5c17464ccf112bbf7034.tar.xz |
Fix merge artefacts
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 73 |
2 files changed, 22 insertions, 59 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7e9a82a..bcfb633 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -11358,12 +11358,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11358 | public void ProcessInPacket(Packet packet) | 11358 | public void ProcessInPacket(Packet packet) |
11359 | { | 11359 | { |
11360 | if (m_debugPacketLevel >= 255) | 11360 | if (m_debugPacketLevel >= 255) |
11361 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); | 11361 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); |
11362 | 11362 | ||
11363 | if (!ProcessPacketMethod(Pack)) | 11363 | if (!ProcessPacketMethod(packet)) |
11364 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); | 11364 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); |
11365 | 11365 | ||
11366 | PacketPool.Instance.ReturnPacket(Pack); | 11366 | PacketPool.Instance.ReturnPacket(packet); |
11367 | } | 11367 | } |
11368 | 11368 | ||
11369 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 11369 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ec39df8..b637317 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
127 | 127 | ||
128 | private Vector3 m_avInitialPos; // used to calculate unscripted sit rotation | 128 | private Vector3 m_avInitialPos; // used to calculate unscripted sit rotation |
129 | private Vector3 m_avUnscriptedSitPos; // for non-scripted prims | 129 | private Vector3 m_avUnscriptedSitPos; // for non-scripted prims |
130 | private Vector3 m_lastPosition; | 130 | private Vector3 m_lastPosition; |
131 | private Vector3 m_lastWorldPosition; | 131 | private Vector3 m_lastWorldPosition; |
132 | private Quaternion m_lastRotation; | 132 | private Quaternion m_lastRotation; |
133 | private Vector3 m_lastVelocity; | 133 | private Vector3 m_lastVelocity; |
@@ -892,11 +892,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
892 | 892 | ||
893 | m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; | 893 | m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; |
894 | 894 | ||
895 | <<<<<<< HEAD | ||
896 | m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); | 895 | m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); |
897 | ======= | ||
898 | m_scene.SetRootAgentScene(m_uuid); | ||
899 | >>>>>>> 91b1d17... Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready. | ||
900 | 896 | ||
901 | // Moved this from SendInitialData to ensure that m_appearance is initialized | 897 | // Moved this from SendInitialData to ensure that m_appearance is initialized |
902 | // before the inventory is processed in MakeRootAgent. This fixes a race condition | 898 | // before the inventory is processed in MakeRootAgent. This fixes a race condition |
@@ -912,7 +908,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
912 | { | 908 | { |
913 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.N); | 909 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.N); |
914 | pos.Y = crossedBorder.BorderLine.Z - 1; | 910 | pos.Y = crossedBorder.BorderLine.Z - 1; |
915 | <<<<<<< HEAD | ||
916 | } | 911 | } |
917 | 912 | ||
918 | //If they're TP'ing in or logging in, we haven't had time to add any known child regions yet. | 913 | //If they're TP'ing in or logging in, we haven't had time to add any known child regions yet. |
@@ -929,24 +924,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
929 | pos = land.LandData.UserLocation; | 924 | pos = land.LandData.UserLocation; |
930 | } | 925 | } |
931 | } | 926 | } |
932 | ======= | ||
933 | } | ||
934 | |||
935 | //If they're TP'ing in or logging in, we haven't had time to add any known child regions yet. | ||
936 | //This has the unfortunate consequence that if somebody is TP'ing who is already a child agent, | ||
937 | //they'll bypass the landing point. But I can't think of any decent way of fixing this. | ||
938 | if (KnownChildRegionHandles.Count == 0) | ||
939 | { | ||
940 | ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); | ||
941 | if (land != null) | ||
942 | { | ||
943 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. | ||
944 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero && m_userLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid) && land.LandData.OwnerID != m_uuid) | ||
945 | { | ||
946 | pos = land.LandData.UserLocation; | ||
947 | } | ||
948 | } | ||
949 | >>>>>>> 91b1d17... Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready. | ||
950 | } | 927 | } |
951 | 928 | ||
952 | if (pos.X < 0 || pos.Y < 0 || pos.Z < 0) | 929 | if (pos.X < 0 || pos.Y < 0 || pos.Z < 0) |
@@ -1130,8 +1107,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1130 | bool isFlying = false; | 1107 | bool isFlying = false; |
1131 | 1108 | ||
1132 | if (m_physicsActor != null) | 1109 | if (m_physicsActor != null) |
1133 | isFlying = m_physicsActor.Flying; | 1110 | isFlying = m_physicsActor.Flying; |
1134 | 1111 | ||
1135 | RemoveFromPhysicalScene(); | 1112 | RemoveFromPhysicalScene(); |
1136 | Velocity = Vector3.Zero; | 1113 | Velocity = Vector3.Zero; |
1137 | AbsolutePosition = pos; | 1114 | AbsolutePosition = pos; |
@@ -1142,7 +1119,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1142 | SetHeight(m_appearance.AvatarHeight); | 1119 | SetHeight(m_appearance.AvatarHeight); |
1143 | } | 1120 | } |
1144 | 1121 | ||
1145 | SendTerseUpdateToAllClients(); | 1122 | SendTerseUpdateToAllClients(); |
1146 | 1123 | ||
1147 | } | 1124 | } |
1148 | 1125 | ||
@@ -1848,14 +1825,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1848 | // else | 1825 | // else |
1849 | // { // single or child prim | 1826 | // { // single or child prim |
1850 | 1827 | ||
1851 | // } | 1828 | // } |
1852 | if (part == null) //CW: Part may be gone. llDie() for example. | 1829 | if (part == null) //CW: Part may be gone. llDie() for example. |
1853 | { | 1830 | { |
1854 | partRot = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f); | 1831 | partRot = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f); |
1855 | } | 1832 | } |
1856 | else | 1833 | else |
1857 | { | 1834 | { |
1858 | partRot = part.GetWorldRotation(); | 1835 | partRot = part.GetWorldRotation(); |
1859 | } | 1836 | } |
1860 | 1837 | ||
1861 | Quaternion partIRot = Quaternion.Inverse(partRot); | 1838 | Quaternion partIRot = Quaternion.Inverse(partRot); |
@@ -1863,7 +1840,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1863 | Quaternion avatarRot = Quaternion.Inverse(Quaternion.Inverse(Rotation) * partIRot); // world or. of the av | 1840 | Quaternion avatarRot = Quaternion.Inverse(Quaternion.Inverse(Rotation) * partIRot); // world or. of the av |
1864 | Vector3 avStandUp = new Vector3(1.0f, 0f, 0f) * avatarRot; // 1M infront of av | 1841 | Vector3 avStandUp = new Vector3(1.0f, 0f, 0f) * avatarRot; // 1M infront of av |
1865 | 1842 | ||
1866 | <<<<<<< HEAD | ||
1867 | 1843 | ||
1868 | if (m_physicsActor == null) | 1844 | if (m_physicsActor == null) |
1869 | { | 1845 | { |
@@ -1876,24 +1852,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1876 | AbsolutePosition = avWorldStandUp; //KF: Fix stand up. | 1852 | AbsolutePosition = avWorldStandUp; //KF: Fix stand up. |
1877 | part.IsOccupied = false; | 1853 | part.IsOccupied = false; |
1878 | part.ParentGroup.DeleteAvatar(ControllingClient.AgentId); | 1854 | part.ParentGroup.DeleteAvatar(ControllingClient.AgentId); |
1879 | ======= | ||
1880 | |||
1881 | if (m_physicsActor == null) | ||
1882 | { | ||
1883 | AddToPhysicalScene(false); | ||
1884 | >>>>>>> 91b1d17... Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready. | ||
1885 | } | 1855 | } |
1886 | //CW: If the part isn't null then we can set the current position | 1856 | else |
1887 | if (part != null) | 1857 | { |
1888 | { | 1858 | //CW: Since the part doesn't exist, a coarse standup position isn't an issue |
1889 | Vector3 avWorldStandUp = avStandUp + part.GetWorldPosition() + (m_pos * partRot); // + av sit offset! | 1859 | AbsolutePosition = m_lastWorldPosition; |
1890 | AbsolutePosition = avWorldStandUp; //KF: Fix stand up. | ||
1891 | part.IsOccupied = false; | ||
1892 | } | ||
1893 | else | ||
1894 | { | ||
1895 | //CW: Since the part doesn't exist, a coarse standup position isn't an issue | ||
1896 | AbsolutePosition = m_lastWorldPosition; | ||
1897 | } | 1860 | } |
1898 | 1861 | ||
1899 | m_parentPosition = Vector3.Zero; | 1862 | m_parentPosition = Vector3.Zero; |
@@ -2057,7 +2020,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2057 | // if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5) | 2020 | // if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5) |
2058 | if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 256.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 256.0f) ) | 2021 | if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 256.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 256.0f) ) |
2059 | { | 2022 | { |
2060 | autopilot = false; // close enough | 2023 | autopilot = false; // close enough |
2061 | m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup. | 2024 | m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup. |
2062 | Not using the part's position because returning the AV to the last known standing | 2025 | Not using the part's position because returning the AV to the last known standing |
2063 | position is likely to be more friendly, isn't it? */ | 2026 | position is likely to be more friendly, isn't it? */ |
@@ -2067,7 +2030,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2067 | } // else the autopilot will get us close | 2030 | } // else the autopilot will get us close |
2068 | } | 2031 | } |
2069 | else | 2032 | else |
2070 | { // its a scripted sit | 2033 | { // its a scripted sit |
2071 | m_lastWorldPosition = part.AbsolutePosition; /* CW - This give us a position to return the avatar to if the part is killed before standup. | 2034 | m_lastWorldPosition = part.AbsolutePosition; /* CW - This give us a position to return the avatar to if the part is killed before standup. |
2072 | I *am* using the part's position this time because we have no real idea how far away | 2035 | I *am* using the part's position this time because we have no real idea how far away |
2073 | the avatar is from the sit target. */ | 2036 | the avatar is from the sit target. */ |