aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs1
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/CollisionSounds.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs72
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
7 files changed, 86 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
index 0fcafcc..ccb583d 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
@@ -116,5 +116,6 @@ namespace OpenSim.Region.Framework.Interfaces
116 /// <param name="regionUUID">the region UUID</param> 116 /// <param name="regionUUID">the region UUID</param>
117 void RemoveRegionEnvironmentSettings(UUID regionUUID); 117 void RemoveRegionEnvironmentSettings(UUID regionUUID);
118 118
119 UUID[] GetObjectIDs(UUID regionID);
119 } 120 }
120} 121}
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index e424976..d7c80f7 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -106,6 +106,7 @@ namespace OpenSim.Region.Framework.Interfaces
106 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID); 106 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
107 void StoreRegionWindlightSettings(RegionLightShareData wl); 107 void StoreRegionWindlightSettings(RegionLightShareData wl);
108 void RemoveRegionWindlightSettings(UUID regionID); 108 void RemoveRegionWindlightSettings(UUID regionID);
109 UUID[] GetObjectIDs(UUID regionID);
109 110
110 /// <summary> 111 /// <summary>
111 /// Load Environment settings from region storage 112 /// Load Environment settings from region storage
diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
index a95e75a..075724e 100644
--- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
+++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
@@ -266,9 +266,11 @@ namespace OpenSim.Region.Framework.Scenes
266 else 266 else
267 { 267 {
268 volume = Math.Abs(colInfo.relativeVel); 268 volume = Math.Abs(colInfo.relativeVel);
269 if (volume < 0.2f) 269 // Most noral collisions (running into walls, stairs)
270 // should never be heard.
271 if (volume < 3.2f)
270 continue; 272 continue;
271 m_log.DebugFormat("Collision speed was {0}", volume); 273// m_log.DebugFormat("Collision speed was {0}", volume);
272 274
273 // Cap to 0.2 times volume because climbing stairs should not be noisy 275 // Cap to 0.2 times volume because climbing stairs should not be noisy
274 // Also changed scaling 276 // Also changed scaling
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e83696b..6feb883 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1059,6 +1059,7 @@ namespace OpenSim.Region.Framework.Scenes
1059 IsChildAgent = true; 1059 IsChildAgent = true;
1060 m_scene.SwapRootAgentCount(true); 1060 m_scene.SwapRootAgentCount(true);
1061 RemoveFromPhysicalScene(); 1061 RemoveFromPhysicalScene();
1062 ParentID = 0; // Child agents can't be sitting
1062 1063
1063 // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into 1064 // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into
1064 1065
@@ -2102,6 +2103,9 @@ namespace OpenSim.Region.Framework.Scenes
2102 2103
2103 public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset) 2104 public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset)
2104 { 2105 {
2106 if (IsChildAgent)
2107 return;
2108
2105 if (ParentID != 0) 2109 if (ParentID != 0)
2106 { 2110 {
2107 StandUp(); 2111 StandUp();
@@ -2905,8 +2909,9 @@ namespace OpenSim.Region.Framework.Scenes
2905 2909
2906 // If we don't have a PhysActor, we can't cross anyway 2910 // If we don't have a PhysActor, we can't cross anyway
2907 // Also don't do this while sat, sitting avatars cross with the 2911 // Also don't do this while sat, sitting avatars cross with the
2908 // object they sit on. 2912 // object they sit on. ParentUUID denoted a pending sit, don't
2909 if (ParentID != 0 || PhysicsActor == null) 2913 // interfere with it.
2914 if (ParentID != 0 || PhysicsActor == null || ParentUUID != UUID.Zero)
2910 return; 2915 return;
2911 2916
2912 if (!IsInTransit) 2917 if (!IsInTransit)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6af3c1e..713f832 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4564,10 +4564,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4564 ScriptSleep(5000); 4564 ScriptSleep(5000);
4565 } 4565 }
4566 4566
4567 public void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt) 4567 public void llTeleportAgent(string agent, string destination, LSL_Vector pos, LSL_Vector lookAt)
4568 { 4568 {
4569 m_host.AddScriptLPS(1); 4569 m_host.AddScriptLPS(1);
4570 UUID agentId = new UUID(); 4570 UUID agentId = new UUID();
4571
4572 Vector3 targetPos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
4573 Vector3 targetLookAt = new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z);
4574
4571 if (UUID.TryParse(agent, out agentId)) 4575 if (UUID.TryParse(agent, out agentId))
4572 { 4576 {
4573 ScenePresence presence = World.GetScenePresence(agentId); 4577 ScenePresence presence = World.GetScenePresence(agentId);
@@ -4576,26 +4580,84 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4576 // agent must not be a god 4580 // agent must not be a god
4577 if (presence.GodLevel >= 200) return; 4581 if (presence.GodLevel >= 200) return;
4578 4582
4579 if (simname == String.Empty) 4583 if (destination == String.Empty)
4580 simname = World.RegionInfo.RegionName; 4584 destination = World.RegionInfo.RegionName;
4585
4586 // agent must be over the owners land
4587 if (m_host.OwnerID == World.LandChannel.GetLandObject(
4588 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
4589 {
4590 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4591 }
4592 else // or must be wearing the prim
4593 {
4594 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID)
4595 {
4596 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4597 }
4598 }
4599 }
4600 }
4601 }
4602
4603 public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector pos, LSL_Vector lookAt)
4604 {
4605 m_host.AddScriptLPS(1);
4606 UUID agentId = new UUID();
4607
4608 ulong regionHandle = Utils.UIntsToLong((uint)global_coords.x, (uint)global_coords.y);
4609
4610 Vector3 targetPos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
4611 Vector3 targetLookAt = new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z);
4612 if (UUID.TryParse(agent, out agentId))
4613 {
4614 ScenePresence presence = World.GetScenePresence(agentId);
4615 if (presence != null && presence.PresenceType != PresenceType.Npc)
4616 {
4617 // agent must not be a god
4618 if (presence.GodLevel >= 200) return;
4581 4619
4582 // agent must be over the owners land 4620 // agent must be over the owners land
4583 if (m_host.OwnerID == World.LandChannel.GetLandObject( 4621 if (m_host.OwnerID == World.LandChannel.GetLandObject(
4584 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) 4622 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
4585 { 4623 {
4586 World.RequestTeleportLocation(presence.ControllingClient, simname, new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z), (uint)TeleportFlags.ViaLocation); 4624 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation);
4587 } 4625 }
4588 else // or must be wearing the prim 4626 else // or must be wearing the prim
4589 { 4627 {
4590 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID) 4628 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID)
4591 { 4629 {
4592 World.RequestTeleportLocation(presence.ControllingClient, simname, new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z), (uint)TeleportFlags.ViaLocation); 4630 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation);
4593 } 4631 }
4594 } 4632 }
4595 } 4633 }
4596 } 4634 }
4597 } 4635 }
4598 4636
4637 private void DoLLTeleport(ScenePresence sp, string destination, Vector3 targetPos, Vector3 targetLookAt)
4638 {
4639 UUID assetID = KeyOrName(destination);
4640
4641 // The destinaion is not an asset ID and also doesn't name a landmark.
4642 // Use it as a sim name
4643 if (assetID == UUID.Zero)
4644 {
4645 World.RequestTeleportLocation(sp.ControllingClient, destination, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation);
4646 return;
4647 }
4648
4649 AssetBase lma = World.AssetService.Get(assetID.ToString());
4650 if (lma == null)
4651 return;
4652
4653 if (lma.Type != (sbyte)AssetType.Landmark)
4654 return;
4655
4656 AssetLandmark lm = new AssetLandmark(lma);
4657
4658 World.RequestTeleportLocation(sp.ControllingClient, lm.RegionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation);
4659 }
4660
4599 public void llTextBox(string agent, string message, int chatChannel) 4661 public void llTextBox(string agent, string message, int chatChannel)
4600 { 4662 {
4601 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 4663 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 048124d..749fc97 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -407,6 +407,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
407 void llTargetRemove(int number); 407 void llTargetRemove(int number);
408 void llTeleportAgentHome(string agent); 408 void llTeleportAgentHome(string agent);
409 void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt); 409 void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt);
410 void llTeleportAgentGlobalCoords(string agent, LSL_Vector global, LSL_Vector pos, LSL_Vector lookAt);
410 void llTextBox(string avatar, string message, int chat_channel); 411 void llTextBox(string avatar, string message, int chat_channel);
411 LSL_String llToLower(string source); 412 LSL_String llToLower(string source);
412 LSL_String llToUpper(string source); 413 LSL_String llToUpper(string source);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 2d23d30..976969a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1860,6 +1860,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1860 m_LSL_Functions.llTeleportAgent(agent, simname, pos, lookAt); 1860 m_LSL_Functions.llTeleportAgent(agent, simname, pos, lookAt);
1861 } 1861 }
1862 1862
1863 public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global, LSL_Vector pos, LSL_Vector lookAt)
1864 {
1865 m_LSL_Functions.llTeleportAgentGlobalCoords(agent, global, pos, lookAt);
1866 }
1867
1863 public void llTeleportAgentHome(string agent) 1868 public void llTeleportAgentHome(string agent)
1864 { 1869 {
1865 m_LSL_Functions.llTeleportAgentHome(agent); 1870 m_LSL_Functions.llTeleportAgentHome(agent);