aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2012-05-10 00:42:10 +0100
committerMelanie2012-05-10 00:42:10 +0100
commita90822f4b8ce8b10f8d38e09adf45a1e8e4ed86a (patch)
treee14d17475f8dcf643f4153f882f92e89b869a686 /OpenSim/Region
parentMerge branch 'master' into careminster (diff)
parentWhere necessary, rename OpenSim/Services/Connectors/*.cs files to reflect the... (diff)
downloadopensim-SC-a90822f4b8ce8b10f8d38e09adf45a1e8e4ed86a.zip
opensim-SC-a90822f4b8ce8b10f8d38e09adf45a1e8e4ed86a.tar.gz
opensim-SC-a90822f4b8ce8b10f8d38e09adf45a1e8e4ed86a.tar.bz2
opensim-SC-a90822f4b8ce8b10f8d38e09adf45a1e8e4ed86a.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs85
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
7 files changed, 109 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index f14beb0..d397893 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -320,7 +320,7 @@ namespace OpenSim.Region.ClientStack.Linden
320 320
321 m_HostCapsObj.HttpListener.AddStreamHandler( 321 m_HostCapsObj.HttpListener.AddStreamHandler(
322 new BinaryStreamHandler( 322 new BinaryStreamHandler(
323 "POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null)); 323 "POST", capsBase + uploaderPath, uploader.uploaderCaps, "TaskInventoryScriptUpdater", null));
324 324
325 string protocol = "http://"; 325 string protocol = "http://";
326 326
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index bb76717..b354cc0 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -12109,21 +12109,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12109 protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID) 12109 protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
12110 { 12110 {
12111 UUID requestID = UUID.Zero; 12111 UUID requestID = UUID.Zero;
12112 if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) 12112 int sourceType = transferRequest.TransferInfo.SourceType;
12113
12114 if (sourceType == (int)SourceType.Asset)
12113 { 12115 {
12114 requestID = new UUID(transferRequest.TransferInfo.Params, 0); 12116 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
12115 } 12117 }
12116 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) 12118 else if (sourceType == (int)SourceType.SimInventoryItem)
12117 { 12119 {
12118 requestID = new UUID(transferRequest.TransferInfo.Params, 80); 12120 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
12119 } 12121 }
12120 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate) 12122 else if (sourceType == (int)SourceType.SimEstate)
12121 { 12123 {
12122 requestID = taskID; 12124 requestID = taskID;
12123 } 12125 }
12124 12126
12125 12127// m_log.DebugFormat(
12126// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); 12128// "[LLCLIENTVIEW]: Received transfer request for {0} in {1} type {2} by {3}",
12129// requestID, taskID, (SourceType)sourceType, Name);
12127 12130
12128 12131
12129 //Note, the bool returned from the below function is useless since it is always false. 12132 //Note, the bool returned from the below function is useless since it is always false.
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 0089c7d..0837ca5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -300,6 +300,10 @@ namespace OpenSim.Region.Framework.Scenes
300 AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data, remoteClient.AgentId); 300 AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data, remoteClient.AgentId);
301 AssetService.Store(asset); 301 AssetService.Store(asset);
302 302
303// m_log.DebugFormat(
304// "[PRIM INVENTORY]: Stored asset {0} when updating item {1} in prim {2} for {3}",
305// asset.ID, item.Name, part.Name, remoteClient.Name);
306
303 if (isScriptRunning) 307 if (isScriptRunning)
304 { 308 {
305 part.Inventory.RemoveScriptInstance(item.ItemID, false); 309 part.Inventory.RemoveScriptInstance(item.ItemID, false);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ca14399..5bd781c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5953,6 +5953,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5953 m_host.AddScriptLPS(1); 5953 m_host.AddScriptLPS(1);
5954 return "en-us"; 5954 return "en-us";
5955 } 5955 }
5956 /// <summary>
5957 /// http://wiki.secondlife.com/wiki/LlGetAgentList
5958 /// The list of options is currently not used in SL
5959 /// scope is one of:-
5960 /// AGENT_LIST_REGION - all in the region
5961 /// AGENT_LIST_PARCEL - all in the same parcel as the scripted object
5962 /// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the
5963 /// current parcel.
5964 /// </summary>
5965 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
5966 {
5967 m_host.AddScriptLPS(1);
5968
5969 // the constants are 1, 2 and 4 so bits are being set, but you
5970 // get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4
5971 bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION;
5972 bool parcelOwned = scope == ScriptBaseClass.AGENT_LIST_PARCEL_OWNER;
5973 bool parcel = scope == ScriptBaseClass.AGENT_LIST_PARCEL;
5974
5975 LSL_List result = new LSL_List();
5976
5977 if (!regionWide && !parcelOwned && !parcel)
5978 {
5979 result.Add("INVALID_SCOPE");
5980 return result;
5981 }
5982
5983 ILandObject land;
5984 Vector3 pos;
5985 UUID id = UUID.Zero;
5986 if (parcel || parcelOwned)
5987 {
5988 pos = m_host.ParentGroup.RootPart.GetWorldPosition();
5989 land = World.LandChannel.GetLandObject(pos.X, pos.Y);
5990 if (land == null)
5991 {
5992 id = UUID.Zero;
5993 }
5994 else
5995 {
5996 if (parcelOwned)
5997 {
5998 id = land.LandData.OwnerID;
5999 }
6000 else
6001 {
6002 id = land.LandData.GlobalID;
6003 }
6004 }
6005 }
6006 List<UUID> presenceIds = new List<UUID>();
6007
6008 World.ForEachRootScenePresence(
6009 delegate (ScenePresence ssp)
6010 {
6011 // Gods are not listed in SL
6012 if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent)
6013 {
6014 if (!regionWide)
6015 {
6016 pos = ssp.AbsolutePosition;
6017 land = World.LandChannel.GetLandObject(pos.X, pos.Y);
6018 if (land != null)
6019 {
6020 if (parcelOwned && land.LandData.OwnerID == id ||
6021 parcel && land.LandData.GlobalID == id)
6022 {
6023 result.Add(ssp.UUID.ToString());
6024 }
6025 }
6026 }
6027 else
6028 {
6029 result.Add(ssp.UUID.ToString());
6030 }
6031 }
6032 // Maximum of 100 results
6033 if (result.Length > 99)
6034 {
6035 return;
6036 }
6037 }
6038 );
6039 return result;
6040 }
5956 6041
5957 public void llAdjustSoundVolume(double volume) 6042 public void llAdjustSoundVolume(double volume)
5958 { 6043 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 2ecc455..048124d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -109,6 +109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
109 LSL_Vector llGetAccel(); 109 LSL_Vector llGetAccel();
110 LSL_Integer llGetAgentInfo(string id); 110 LSL_Integer llGetAgentInfo(string id);
111 LSL_String llGetAgentLanguage(string id); 111 LSL_String llGetAgentLanguage(string id);
112 LSL_List llGetAgentList(LSL_Integer scope, LSL_List options);
112 LSL_Vector llGetAgentSize(string id); 113 LSL_Vector llGetAgentSize(string id);
113 LSL_Float llGetAlpha(int face); 114 LSL_Float llGetAlpha(int face);
114 LSL_Float llGetAndResetTime(); 115 LSL_Float llGetAndResetTime();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 9d830c8..5c6ad8a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -503,6 +503,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
503 public const int OBJECT_STREAMING_COST = 15; 503 public const int OBJECT_STREAMING_COST = 15;
504 public const int OBJECT_PHYSICS_COST = 16; 504 public const int OBJECT_PHYSICS_COST = 16;
505 505
506 // for llGetAgentList
507 public const int AGENT_LIST_PARCEL = 1;
508 public const int AGENT_LIST_PARCEL_OWNER = 2;
509 public const int AGENT_LIST_REGION = 4;
510
506 // Can not be public const? 511 // Can not be public const?
507 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); 512 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);
508 public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0); 513 public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 8db4006..2d23d30 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -396,6 +396,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
396 return m_LSL_Functions.llGetAgentLanguage(id); 396 return m_LSL_Functions.llGetAgentLanguage(id);
397 } 397 }
398 398
399 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
400 {
401 return m_LSL_Functions.llGetAgentList(scope, options);
402 }
403
399 public LSL_Vector llGetAgentSize(string id) 404 public LSL_Vector llGetAgentSize(string id)
400 { 405 {
401 return m_LSL_Functions.llGetAgentSize(id); 406 return m_LSL_Functions.llGetAgentSize(id);