aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs36
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs86
2 files changed, 65 insertions, 57 deletions
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/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8fae032..5acd51e 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
1850 // send agentData to all clients including us (?)
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 1842
1856 // attachments 1843 if (!IsChildAgent)
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