diff options
author | UbitUmarov | 2017-04-14 21:55:37 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-14 21:55:37 +0100 |
commit | 63383bf3c5f5923b33e43ddd6b24b5616288ff4f (patch) | |
tree | a3d48d9f584c283bacd2d22ab61ef9d30449c3af /OpenSim/Region/Framework | |
parent | update ode binaries for windows (diff) | |
download | opensim-SC-63383bf3c5f5923b33e43ddd6b24b5616288ff4f.zip opensim-SC-63383bf3c5f5923b33e43ddd6b24b5616288ff4f.tar.gz opensim-SC-63383bf3c5f5923b33e43ddd6b24b5616288ff4f.tar.bz2 opensim-SC-63383bf3c5f5923b33e43ddd6b24b5616288ff4f.tar.xz |
add functions to send entity updates imediatly, except for avatars (or now) they should be use to bypass normal delayed updates, for debug
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a5af7e1..d50de27 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1778,6 +1778,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
1778 | 1778 | ||
1779 | private Dictionary<ulong, spRegionSizeInfo> m_knownChildRegionsSizeInfo = new Dictionary<ulong, spRegionSizeInfo>(); | 1779 | private Dictionary<ulong, spRegionSizeInfo> m_knownChildRegionsSizeInfo = new Dictionary<ulong, spRegionSizeInfo>(); |
1780 | 1780 | ||
1781 | public void AddNeighbourRegion(GridRegion region, string capsPath) | ||
1782 | { | ||
1783 | lock (m_knownChildRegions) | ||
1784 | { | ||
1785 | ulong regionHandle = region.RegionHandle; | ||
1786 | m_knownChildRegions.Add(regionHandle,capsPath); | ||
1787 | |||
1788 | spRegionSizeInfo sizeInfo = new spRegionSizeInfo(); | ||
1789 | sizeInfo.sizeX = region.RegionSizeX; | ||
1790 | sizeInfo.sizeY = region.RegionSizeY; | ||
1791 | m_knownChildRegionsSizeInfo[regionHandle] = sizeInfo; | ||
1792 | } | ||
1793 | } | ||
1794 | |||
1781 | public void AddNeighbourRegionSizeInfo(GridRegion region) | 1795 | public void AddNeighbourRegionSizeInfo(GridRegion region) |
1782 | { | 1796 | { |
1783 | lock (m_knownChildRegions) | 1797 | lock (m_knownChildRegions) |
@@ -1826,6 +1840,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1826 | } | 1840 | } |
1827 | } | 1841 | } |
1828 | 1842 | ||
1843 | public bool knowsNeighbourRegion(ulong regionHandle) | ||
1844 | { | ||
1845 | lock (m_knownChildRegions) | ||
1846 | return m_knownChildRegions.ContainsKey(regionHandle); | ||
1847 | } | ||
1848 | |||
1829 | public void DropOldNeighbours(List<ulong> oldRegions) | 1849 | public void DropOldNeighbours(List<ulong> oldRegions) |
1830 | { | 1850 | { |
1831 | foreach (ulong handle in oldRegions) | 1851 | foreach (ulong handle in oldRegions) |
@@ -2010,6 +2030,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2010 | return; | 2030 | return; |
2011 | } | 2031 | } |
2012 | 2032 | ||
2033 | |||
2013 | m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2034 | m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2014 | 2035 | ||
2015 | if(!haveGroupInformation && !IsChildAgent && !IsNPC) | 2036 | if(!haveGroupInformation && !IsChildAgent && !IsNPC) |
@@ -2069,6 +2090,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2069 | 2090 | ||
2070 | if (!IsChildAgent) | 2091 | if (!IsChildAgent) |
2071 | { | 2092 | { |
2093 | if( ParentPart != null && !IsNPC && (crossingFlags & 0x08) != 0) | ||
2094 | { | ||
2095 | |||
2096 | // SceneObjectPart root = ParentPart.ParentGroup.RootPart; | ||
2097 | // if(root.LocalId != ParentPart.LocalId) | ||
2098 | // ControllingClient.SendEntityTerseUpdateImmediate(root); | ||
2099 | // ControllingClient.SendEntityTerseUpdateImmediate(ParentPart); | ||
2100 | ParentPart.ParentGroup.SendFullUpdateToClient(ControllingClient); | ||
2101 | } | ||
2102 | |||
2072 | // verify baked textures and cache | 2103 | // verify baked textures and cache |
2073 | bool cachedbaked = false; | 2104 | bool cachedbaked = false; |
2074 | 2105 | ||
@@ -2130,6 +2161,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2130 | 2161 | ||
2131 | // send avatar object to all presences including us, so they cross it into region | 2162 | // send avatar object to all presences including us, so they cross it into region |
2132 | // then hide if necessary | 2163 | // then hide if necessary |
2164 | |||
2133 | SendInitialAvatarDataToAllAgents(allpresences); | 2165 | SendInitialAvatarDataToAllAgents(allpresences); |
2134 | 2166 | ||
2135 | // send this look | 2167 | // send this look |
@@ -2237,13 +2269,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
2237 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 2269 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
2238 | m_lastChildAgentUpdatePosition = AbsolutePosition; | 2270 | m_lastChildAgentUpdatePosition = AbsolutePosition; |
2239 | m_childUpdatesBusy = false; // allow them | 2271 | m_childUpdatesBusy = false; // allow them |
2272 | |||
2273 | |||
2240 | } | 2274 | } |
2241 | 2275 | ||
2242 | m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2276 | m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2243 | 2277 | ||
2278 | |||
2279 | |||
2244 | // send the rest of the world | 2280 | // send the rest of the world |
2245 | if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) | 2281 | if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) |
2246 | SendInitialDataToMe(); | 2282 | SendInitialDataToMe(); |
2283 | |||
2247 | 2284 | ||
2248 | // priority uses avatar position only | 2285 | // priority uses avatar position only |
2249 | // m_reprioritizationLastPosition = AbsolutePosition; | 2286 | // m_reprioritizationLastPosition = AbsolutePosition; |
@@ -3979,7 +4016,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3979 | int count = 0; | 4016 | int count = 0; |
3980 | foreach (ScenePresence p in presences) | 4017 | foreach (ScenePresence p in presences) |
3981 | { | 4018 | { |
3982 | p.ControllingClient.SendAvatarDataImmediate(this); | 4019 | p.ControllingClient.SendEntityFullUpdateImmediate(this); |
3983 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) | 4020 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) |
3984 | // either just kill the object | 4021 | // either just kill the object |
3985 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4022 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
@@ -3992,7 +4029,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3992 | 4029 | ||
3993 | public void SendInitialAvatarDataToAgent(ScenePresence p) | 4030 | public void SendInitialAvatarDataToAgent(ScenePresence p) |
3994 | { | 4031 | { |
3995 | p.ControllingClient.SendAvatarDataImmediate(this); | 4032 | p.ControllingClient.SendEntityFullUpdateImmediate(this); |
3996 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) | 4033 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) |
3997 | // either just kill the object | 4034 | // either just kill the object |
3998 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4035 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
@@ -4009,12 +4046,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4009 | //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); | 4046 | //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); |
4010 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.IsViewerUIGod) | 4047 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.IsViewerUIGod) |
4011 | return; | 4048 | return; |
4012 | avatar.ControllingClient.SendAvatarDataImmediate(this); | 4049 | avatar.ControllingClient.SendEntityFullUpdateImmediate(this); |
4013 | } | 4050 | } |
4014 | 4051 | ||
4015 | public void SendAvatarDataToAgentNF(ScenePresence avatar) | 4052 | public void SendAvatarDataToAgentNF(ScenePresence avatar) |
4016 | { | 4053 | { |
4017 | avatar.ControllingClient.SendAvatarDataImmediate(this); | 4054 | avatar.ControllingClient.SendEntityFullUpdateImmediate(this); |
4018 | } | 4055 | } |
4019 | 4056 | ||
4020 | /// <summary> | 4057 | /// <summary> |