aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2014-08-11 18:45:39 +0200
committerMelanie Thielker2014-08-11 18:45:39 +0200
commit22d472e34a8f789fdefc2bf7f0d6e859f8f83303 (patch)
treefa73dec548fb0a83170865b2ae08d602789b99c3 /OpenSim/Region/Framework/Scenes
parentMerge branch 'avination-current' (diff)
parentremove a land.SendLandUpdateToClient() since its now done for all cases in (diff)
downloadopensim-SC-22d472e34a8f789fdefc2bf7f0d6e859f8f83303.zip
opensim-SC-22d472e34a8f789fdefc2bf7f0d6e859f8f83303.tar.gz
opensim-SC-22d472e34a8f789fdefc2bf7f0d6e859f8f83303.tar.bz2
opensim-SC-22d472e34a8f789fdefc2bf7f0d6e859f8f83303.tar.xz
Merge branch 'ubitworkmaster'
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs101
1 files changed, 48 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8fae032..62dea07 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1823,12 +1823,12 @@ namespace OpenSim.Region.Framework.Scenes
1823 Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); 1823 Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI);
1824 m_callbackURI = null; 1824 m_callbackURI = null;
1825 } 1825 }
1826 // else 1826// else
1827 // { 1827// {
1828 // m_log.DebugFormat( 1828// m_log.DebugFormat(
1829 // "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}", 1829// "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}",
1830 // client.Name, client.AgentId, m_scene.RegionInfo.RegionName); 1830// client.Name, client.AgentId, m_scene.RegionInfo.RegionName);
1831 // } 1831// }
1832 1832
1833 m_previusParcelHide = false; 1833 m_previusParcelHide = false;
1834 m_previusParcelUUID = UUID.Zero; 1834 m_previusParcelUUID = UUID.Zero;
@@ -1838,59 +1838,51 @@ namespace OpenSim.Region.Framework.Scenes
1838 // send initial land overlay and parcel 1838 // send initial land overlay and parcel
1839 ILandChannel landch = m_scene.LandChannel; 1839 ILandChannel landch = m_scene.LandChannel;
1840 if (landch != null) 1840 if (landch != null)
1841 {
1842 landch.sendClientInitialLandInfo(client); 1841 landch.sendClientInitialLandInfo(client);
1843 if (!IsChildAgent)
1844 {
1845 newhide = m_currentParcelHide;
1846 m_currentParcelHide = false;
1847 }
1848 }
1849 1842
1850 // send agentData to all clients including us (?) 1843 if (!IsChildAgent)
1851 // get appearance
1852 // if in cache sent it to all clients
1853 // send what we have to us, even if not in cache ( bad? )
1854 ValidateAndSendAppearanceAndAgentData();
1855
1856 // attachments
1857 if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0)
1858 { 1844 {
1859 if (Scene.AttachmentsModule != null) 1845 newhide = m_currentParcelHide;
1846 m_currentParcelHide = false;
1847
1848 ValidateAndSendAppearanceAndAgentData();
1849
1850 // attachments
1851 if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0)
1852 {
1853 if (Scene.AttachmentsModule != null)
1860// Util.FireAndForget( 1854// Util.FireAndForget(
1861// o => 1855// o =>
1862// { 1856// {
1863 Scene.AttachmentsModule.RezAttachments(this); 1857 Scene.AttachmentsModule.RezAttachments(this);
1864// }); 1858 // });
1865 } 1859 }
1866 else 1860 else
1867 {
1868 List<SceneObjectGroup> attachments = GetAttachments();
1869
1870 if (attachments.Count > 0)
1871 { 1861 {
1872 m_log.DebugFormat( 1862 List<SceneObjectGroup> attachments = GetAttachments();
1873 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
1874 1863
1875 // Resume scripts this possible should also be moved down after sending the avatar to viewer ? 1864 if (attachments.Count > 0)
1876 foreach (SceneObjectGroup sog in attachments)
1877 { 1865 {
1878 sog.ScheduleGroupForFullUpdate(); 1866 m_log.DebugFormat(
1879 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); 1867 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
1880 sog.ResumeScripts(); 1868
1869 // Resume scripts this possible should also be moved down after sending the avatar to viewer ?
1870 foreach (SceneObjectGroup sog in attachments)
1871 {
1872 sog.ScheduleGroupForFullUpdate();
1873 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1874 sog.ResumeScripts();
1875 }
1881 } 1876 }
1882 } 1877 }
1883 }
1884 // m_log.DebugFormat(
1885 // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
1886 // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
1887 1878
1888 // Create child agents in neighbouring regions 1879 // Create child agents in neighbouring regions
1889 if (openChildAgents && !IsChildAgent) 1880 if (openChildAgents)
1890 { 1881 {
1891 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1882 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1892 if (m_agentTransfer != null) 1883 if (m_agentTransfer != null)
1893 m_agentTransfer.EnableChildAgents(this); 1884 m_agentTransfer.EnableChildAgents(this);
1885 }
1894 } 1886 }
1895 1887
1896 // send the rest of the world 1888 // send the rest of the world
@@ -3871,7 +3863,7 @@ namespace OpenSim.Region.Framework.Scenes
3871 protected bool CrossToNewRegion() 3863 protected bool CrossToNewRegion()
3872 { 3864 {
3873 bool result = false; 3865 bool result = false;
3874 parcelRegionCross(false); 3866// parcelRegionCross(false);
3875 try 3867 try
3876 { 3868 {
3877 result = m_scene.CrossAgentToNewRegion(this, Flying); 3869 result = m_scene.CrossAgentToNewRegion(this, Flying);
@@ -3880,8 +3872,8 @@ namespace OpenSim.Region.Framework.Scenes
3880 { 3872 {
3881 result = m_scene.CrossAgentToNewRegion(this, false); 3873 result = m_scene.CrossAgentToNewRegion(this, false);
3882 } 3874 }
3883 if(!result) 3875 // if(!result)
3884 parcelRegionCross(true); 3876 // parcelRegionCross(true);
3885 3877
3886 return result; 3878 return result;
3887 3879
@@ -5166,8 +5158,8 @@ namespace OpenSim.Region.Framework.Scenes
5166 pos = land.LandData.UserLocation; 5158 pos = land.LandData.UserLocation;
5167 } 5159 }
5168 } 5160 }
5169 5161// this is now done in completeMovement for all cases and not just this
5170 land.SendLandUpdateToClient(ControllingClient); 5162// land.SendLandUpdateToClient(ControllingClient);
5171 } 5163 }
5172 } 5164 }
5173 5165
@@ -5539,7 +5531,7 @@ namespace OpenSim.Region.Framework.Scenes
5539 } 5531 }
5540 } 5532 }
5541 5533
5542 private void parcelRegionCross(bool abort) 5534 public void parcelRegionCross(bool abort)
5543 { 5535 {
5544 if (!ParcelHideThisAvatar) 5536 if (!ParcelHideThisAvatar)
5545 return; 5537 return;
@@ -5619,6 +5611,9 @@ namespace OpenSim.Region.Framework.Scenes
5619 if (IsInTransit) 5611 if (IsInTransit)
5620 return; 5612 return;
5621 5613
5614 if (IsChildAgent)
5615 return;
5616
5622 if (check) 5617 if (check)
5623 { 5618 {
5624 // check is relative to current parcel only 5619 // check is relative to current parcel only