aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
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
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')
-rw-r--r--OpenSim/Capabilities/Caps.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs36
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs20
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs25
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs101
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs11
7 files changed, 114 insertions, 96 deletions
diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs
index 30a323e..b35e6b4 100644
--- a/OpenSim/Capabilities/Caps.cs
+++ b/OpenSim/Capabilities/Caps.cs
@@ -139,6 +139,7 @@ namespace OpenSim.Framework.Capabilities
139 m_agentID = agent; 139 m_agentID = agent;
140 m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL); 140 m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL);
141 m_regionName = regionName; 141 m_regionName = regionName;
142 m_capsActive.Reset();
142 } 143 }
143 144
144 /// <summary> 145 /// <summary>
@@ -263,7 +264,7 @@ namespace OpenSim.Framework.Capabilities
263 public bool WaitForActivation() 264 public bool WaitForActivation()
264 { 265 {
265 // Wait for 30s. If that elapses, return false and run without caps 266 // Wait for 30s. If that elapses, return false and run without caps
266 return m_capsActive.WaitOne(30000); 267 return m_capsActive.WaitOne(120000);
267 } 268 }
268 } 269 }
269} \ No newline at end of file 270} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 613bc24..61b9045 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -248,7 +248,19 @@ namespace OpenSim.Region.ClientStack.Linden
248 //m_capsHandlers["MapLayer"] = 248 //m_capsHandlers["MapLayer"] =
249 // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", 249 // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
250 // capsBase + m_mapLayerPath, 250 // capsBase + m_mapLayerPath,
251 // GetMapLayer); 251 // GetMapLayer);
252
253 IRequestHandler getObjectPhysicsDataHandler
254 = new RestStreamHandler(
255 "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null);
256 m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler);
257
258 IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost);
259 m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler);
260 IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected);
261 m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler);
262
263
252 IRequestHandler req 264 IRequestHandler req
253 = new RestStreamHandler( 265 = new RestStreamHandler(
254 "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); 266 "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null);
@@ -283,14 +295,7 @@ namespace OpenSim.Region.ClientStack.Linden
283 m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); 295 m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req);
284 m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); 296 m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req);
285 297
286 IRequestHandler getObjectPhysicsDataHandler 298
287 = new RestStreamHandler(
288 "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null);
289 m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler);
290 IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost);
291 m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler);
292 IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected);
293 m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler);
294 299
295 IRequestHandler UpdateAgentInformationHandler 300 IRequestHandler UpdateAgentInformationHandler
296 = new RestStreamHandler( 301 = new RestStreamHandler(
@@ -1379,6 +1384,17 @@ namespace OpenSim.Region.ClientStack.Linden
1379 1384
1380 resp[uuid.ToString()] = object_data; 1385 resp[uuid.ToString()] = object_data;
1381 } 1386 }
1387 else
1388 {
1389 OSDMap object_data = new OSDMap();
1390 object_data["linked_set_resource_cost"] = 0;
1391 object_data["resource_cost"] = 0;
1392 object_data["physics_cost"] = 0;
1393 object_data["linked_set_physics_cost"] = 0;
1394
1395 resp[uuid.ToString()] = object_data;
1396 }
1397
1382 } 1398 }
1383 } 1399 }
1384 1400
@@ -1443,7 +1459,7 @@ namespace OpenSim.Region.ClientStack.Linden
1443 } 1459 }
1444 } 1460 }
1445 1461
1446 if (simul != 0) 1462 // if (simul != 0)
1447 { 1463 {
1448 OSDMap object_data = new OSDMap(); 1464 OSDMap object_data = new OSDMap();
1449 1465
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index a3fdae1..0bb53c4 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -301,8 +301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
301 /// <remarks> 301 /// <remarks>
302 /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. 302 /// This allows the outbound loop to only operate when there is data to send rather than continuously polling.
303 /// Some data is sent immediately and not queued. That data would not trigger this event. 303 /// Some data is sent immediately and not queued. That data would not trigger this event.
304 /// WRONG use. May be usefull in future revision
304 /// </remarks> 305 /// </remarks>
305 private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); 306// private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false);
306 307
307 private Pool<IncomingPacket> m_incomingPacketPool; 308 private Pool<IncomingPacket> m_incomingPacketPool;
308 309
@@ -990,8 +991,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
990 991
991 PacketPool.Instance.ReturnPacket(packet); 992 PacketPool.Instance.ReturnPacket(packet);
992 993
993 if (packetQueued) 994 /// WRONG use. May be usefull in future revision
994 m_dataPresentEvent.Set(); 995// if (packetQueued)
996// m_dataPresentEvent.Set();
995 } 997 }
996 998
997 /// <summary> 999 /// <summary>
@@ -1418,6 +1420,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1418 queue.Enqueue(buffer); 1420 queue.Enqueue(buffer);
1419 return; 1421 return;
1420 } 1422 }
1423
1421 else if (packet.Type == PacketType.CompleteAgentMovement) 1424 else if (packet.Type == PacketType.CompleteAgentMovement)
1422 { 1425 {
1423 // Send ack straight away to let the viewer know that we got it. 1426 // Send ack straight away to let the viewer know that we got it.
@@ -2150,13 +2153,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2150 2153
2151 // If nothing was sent, sleep for the minimum amount of time before a 2154 // If nothing was sent, sleep for the minimum amount of time before a
2152 // token bucket could get more tokens 2155 // token bucket could get more tokens
2153 //if (!m_packetSent) 2156
2154 // Thread.Sleep((int)TickCountResolution);
2155 //
2156 // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with
2157 // modern mono it reduces CPU base load since there is no more continuous polling.
2158 if (!m_packetSent) 2157 if (!m_packetSent)
2159 m_dataPresentEvent.WaitOne(100); 2158 Thread.Sleep((int)TickCountResolution);
2159
2160 // .... wrong core code removed
2161
2160 2162
2161 Watchdog.UpdateThread(); 2163 Watchdog.UpdateThread();
2162 } 2164 }
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index ccc6861..2290c44 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -366,8 +366,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
366 // called on textures update 366 // called on textures update
367 public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems) 367 public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems)
368 { 368 {
369 bool defonly = true; // are we only using default textures
370
371 // uploaded baked textures will be in assets local cache 369 // uploaded baked textures will be in assets local cache
372 IAssetService cache = m_scene.AssetService; 370 IAssetService cache = m_scene.AssetService;
373 371
@@ -409,8 +407,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
409 continue; 407 continue;
410 } 408 }
411 409
412 defonly = false; // found a non-default texture reference
413
414 if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID) 410 if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID)
415 { 411 {
416 if(wearableCache[idx].CacheId != cacheItems[i].CacheId) 412 if(wearableCache[idx].CacheId != cacheItems[i].CacheId)
@@ -479,14 +475,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
479 sp.Appearance.WearableCacheItems[j].TextureID); 475 sp.Appearance.WearableCacheItems[j].TextureID);
480 } 476 }
481 477
482 // If we only found default textures, then the appearance is not cached 478 return (hits == cacheItems.Length);
483 return (defonly ? false : true);
484 } 479 }
485 480
486 // called when we get a new root avatar 481 // called when we get a new root avatar
487 public bool ValidateBakedTextureCache(IScenePresence sp) 482 public bool ValidateBakedTextureCache(IScenePresence sp)
488 { 483 {
489 bool defonly = true; // are we only using default textures
490 int hits = 0; 484 int hits = 0;
491 485
492 lock (m_setAppearanceLock) 486 lock (m_setAppearanceLock)
@@ -556,10 +550,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
556 face = sp.Appearance.Texture.FaceTextures[idx]; 550 face = sp.Appearance.Texture.FaceTextures[idx];
557 551
558 // this should be removed 552 // this should be removed
559 if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) 553 if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE)
560 { 554 hits++;
561 defonly = false; // found a non-default texture reference
562 }
563 555
564 continue; 556 continue;
565 } 557 }
@@ -587,10 +579,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
587 } 579 }
588 580
589 if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) 581 if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE)
590 {
591 defonly = false; // found a non-default texture reference
592 continue; 582 continue;
593 }
594 583
595 if (wearableCache[idx].TextureID != face.TextureID) 584 if (wearableCache[idx].TextureID != face.TextureID)
596 { 585 {
@@ -603,7 +592,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
603 wearableCache[idx].TextureAsset = null; 592 wearableCache[idx].TextureAsset = null;
604 if (cache != null) 593 if (cache != null)
605 { 594 {
606 wearableCache[idx].TextureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); 595 wearableCache[idx].TextureAsset = m_scene.AssetService.GetCached(face.TextureID.ToString());
607 if (wearableCache[idx].TextureAsset == null) 596 if (wearableCache[idx].TextureAsset == null)
608 { 597 {
609 wearableCache[idx].CacheId = UUID.Zero; 598 wearableCache[idx].CacheId = UUID.Zero;
@@ -618,7 +607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
618 sp.Appearance.WearableCacheItems = wearableCache; 607 sp.Appearance.WearableCacheItems = wearableCache;
619 } 608 }
620 609
621 m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2} {3}", sp.Name, sp.UUID, hits, defonly.ToString()); 610 m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2}", sp.Name, sp.UUID, hits);
622 // debug 611 // debug
623 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) 612 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++)
624 { 613 {
@@ -629,9 +618,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
629 sp.Appearance.WearableCacheItems[j].TextureID); 618 sp.Appearance.WearableCacheItems[j].TextureID);
630 } 619 }
631 620
632 // If we only found default textures, then the appearance is not cached 621 return (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional
633 return (defonly ? false : true);
634 } 622 }
623
635 public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) 624 public int RequestRebake(IScenePresence sp, bool missingTexturesOnly)
636 { 625 {
637 int texturesRebaked = 0; 626 int texturesRebaked = 0;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index d6d86b9..af26998 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1529,7 +1529,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1529 GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos); 1529 GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos);
1530 if (neighbourRegion == null) 1530 if (neighbourRegion == null)
1531 { 1531 {
1532 agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel"); 1532 agent.ControllingClient.SendAlertMessage("Cannot region cross into void");
1533 return false; 1533 return false;
1534 } 1534 }
1535 1535
@@ -1680,7 +1680,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1680 neighbourRegion.RegionName, agent.Name); 1680 neighbourRegion.RegionName, agent.Name);
1681 1681
1682 ReInstantiateScripts(agent); 1682 ReInstantiateScripts(agent);
1683 agent.AddToPhysicalScene(isFlying); 1683 if(agent.ParentID == 0 && agent.ParentUUID == UUID.Zero)
1684 agent.AddToPhysicalScene(isFlying);
1684 1685
1685 return false; 1686 return false;
1686 } 1687 }
@@ -1749,8 +1750,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1749 m_entityTransferStateMachine.ResetFromTransit(agent.UUID); 1750 m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
1750 1751
1751 // now we have a child agent in this region. Request all interesting data about other (root) agents 1752 // now we have a child agent in this region. Request all interesting data about other (root) agents
1752 agent.SendOtherAgentsAvatarDataToMe(); 1753
1753 agent.SendOtherAgentsAppearanceToMe(); 1754 // why do that? we either where a root having all that or we are leaving the area
1755
1756// agent.SendOtherAgentsAvatarDataToMe();
1757// agent.SendOtherAgentsAppearanceToMe();
1758
1759 agent.parcelRegionCross(false);
1754 1760
1755 // Backwards compatibility. Best effort 1761 // Backwards compatibility. Best effort
1756 if (version == "Unknown" || version == string.Empty) 1762 if (version == "Unknown" || version == string.Empty)
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
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 181399d..7bfe27b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -549,7 +549,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
549 return; 549 return;
550 550
551 toRegionPos = presence.AbsolutePosition; 551 toRegionPos = presence.AbsolutePosition;
552 dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos)); 552 dis = Util.GetDistanceTo(toRegionPos, fromRegionPos);
553 if (presence.IsSatOnObject && presence.ParentPart != null &&
554 presence.ParentPart.ParentGroup != null &&
555 presence.ParentPart.ParentGroup.RootPart != null)
556 {
557 Vector3 rpos = presence.ParentPart.ParentGroup.RootPart.AbsolutePosition;
558 double dis2 = Util.GetDistanceTo(rpos, fromRegionPos);
559 if (dis > dis2)
560 dis = dis2;
561 }
553 562
554 // Disabled for now since all osNpc* methods check for appropriate ownership permission. 563 // Disabled for now since all osNpc* methods check for appropriate ownership permission.
555 // Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not 564 // Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not