aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs5
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs12
-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/Framework/Scenes/SceneObjectPart.cs16
-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
10 files changed, 128 insertions, 20 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 4ec64ee..6796f2b 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -618,10 +618,11 @@ namespace OpenSim
618 return; 618 return;
619 } 619 }
620 620
621 PopulateRegionEstateInfo(regInfo); 621 bool changed = PopulateRegionEstateInfo(regInfo);
622 IScene scene; 622 IScene scene;
623 CreateRegion(regInfo, true, out scene); 623 CreateRegion(regInfo, true, out scene);
624 regInfo.EstateSettings.Save(); 624 if (changed)
625 regInfo.EstateSettings.Save();
625 } 626 }
626 627
627 /// <summary> 628 /// <summary>
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 79259d8..045e8d2 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -977,13 +977,13 @@ namespace OpenSim
977 /// Load the estate information for the provided RegionInfo object. 977 /// Load the estate information for the provided RegionInfo object.
978 /// </summary> 978 /// </summary>
979 /// <param name="regInfo"></param> 979 /// <param name="regInfo"></param>
980 public void PopulateRegionEstateInfo(RegionInfo regInfo) 980 public bool PopulateRegionEstateInfo(RegionInfo regInfo)
981 { 981 {
982 if (EstateDataService != null) 982 if (EstateDataService != null)
983 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false); 983 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false);
984 984
985 if (regInfo.EstateSettings.EstateID != 0) 985 if (regInfo.EstateSettings.EstateID != 0)
986 return; 986 return false; // estate info in the database did not change
987 987
988 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); 988 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
989 989
@@ -1018,7 +1018,7 @@ namespace OpenSim
1018 } 1018 }
1019 1019
1020 if (defaultEstateJoined) 1020 if (defaultEstateJoined)
1021 return; 1021 return true; // need to update the database
1022 else 1022 else
1023 m_log.ErrorFormat( 1023 m_log.ErrorFormat(
1024 "[OPENSIM BASE]: Joining default estate {0} failed", defaultEstateName); 1024 "[OPENSIM BASE]: Joining default estate {0} failed", defaultEstateName);
@@ -1080,8 +1080,10 @@ namespace OpenSim
1080 MainConsole.Instance.Output("Joining the estate failed. Please try again."); 1080 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
1081 } 1081 }
1082 } 1082 }
1083 } 1083 }
1084 } 1084
1085 return true; // need to update the database
1086 }
1085 } 1087 }
1086 1088
1087 public class OpenSimConfigSource 1089 public class OpenSimConfigSource
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 9791885..6c28e78 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -309,7 +309,7 @@ namespace OpenSim.Region.ClientStack.Linden
309 309
310 m_HostCapsObj.HttpListener.AddStreamHandler( 310 m_HostCapsObj.HttpListener.AddStreamHandler(
311 new BinaryStreamHandler( 311 new BinaryStreamHandler(
312 "POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null)); 312 "POST", capsBase + uploaderPath, uploader.uploaderCaps, "TaskInventoryScriptUpdater", null));
313 313
314 string protocol = "http://"; 314 string protocol = "http://";
315 315
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index ae5cbff..4d6081c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11955,21 +11955,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11955 protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID) 11955 protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
11956 { 11956 {
11957 UUID requestID = UUID.Zero; 11957 UUID requestID = UUID.Zero;
11958 if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) 11958 int sourceType = transferRequest.TransferInfo.SourceType;
11959
11960 if (sourceType == (int)SourceType.Asset)
11959 { 11961 {
11960 requestID = new UUID(transferRequest.TransferInfo.Params, 0); 11962 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
11961 } 11963 }
11962 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) 11964 else if (sourceType == (int)SourceType.SimInventoryItem)
11963 { 11965 {
11964 requestID = new UUID(transferRequest.TransferInfo.Params, 80); 11966 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
11965 } 11967 }
11966 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate) 11968 else if (sourceType == (int)SourceType.SimEstate)
11967 { 11969 {
11968 requestID = taskID; 11970 requestID = taskID;
11969 } 11971 }
11970 11972
11971 11973// m_log.DebugFormat(
11972// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); 11974// "[LLCLIENTVIEW]: Received transfer request for {0} in {1} type {2} by {3}",
11975// requestID, taskID, (SourceType)sourceType, Name);
11973 11976
11974 m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived); 11977 m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
11975 } 11978 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 816d3b6..8a26df1 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/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 4bec2d4..f911ef8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3321,10 +3321,10 @@ namespace OpenSim.Region.Framework.Scenes
3321 3321
3322 public void SetVehicleFlags(int param, bool remove) 3322 public void SetVehicleFlags(int param, bool remove)
3323 { 3323 {
3324 if (PhysActor != null) 3324 PhysicsActor pa = PhysActor;
3325 { 3325
3326 PhysActor.VehicleFlags(param, remove); 3326 if (pa != null)
3327 } 3327 pa.VehicleFlags(param, remove);
3328 } 3328 }
3329 3329
3330 public void SetGroup(UUID groupID, IClientAPI client) 3330 public void SetGroup(UUID groupID, IClientAPI client)
@@ -3356,10 +3356,12 @@ namespace OpenSim.Region.Framework.Scenes
3356 3356
3357 public void SetPhysicsAxisRotation() 3357 public void SetPhysicsAxisRotation()
3358 { 3358 {
3359 if (PhysActor != null) 3359 PhysicsActor pa = PhysActor;
3360
3361 if (pa != null)
3360 { 3362 {
3361 PhysActor.LockAngularMotion(RotationAxis); 3363 pa.LockAngularMotion(RotationAxis);
3362 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 3364 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
3363 } 3365 }
3364 } 3366 }
3365 3367
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index afd943b..5b5cab8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5529,6 +5529,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5529 m_host.AddScriptLPS(1); 5529 m_host.AddScriptLPS(1);
5530 return "en-us"; 5530 return "en-us";
5531 } 5531 }
5532 /// <summary>
5533 /// http://wiki.secondlife.com/wiki/LlGetAgentList
5534 /// The list of options is currently not used in SL
5535 /// scope is one of:-
5536 /// AGENT_LIST_REGION - all in the region
5537 /// AGENT_LIST_PARCEL - all in the same parcel as the scripted object
5538 /// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the
5539 /// current parcel.
5540 /// </summary>
5541 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
5542 {
5543 m_host.AddScriptLPS(1);
5544
5545 // the constants are 1, 2 and 4 so bits are being set, but you
5546 // get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4
5547 bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION;
5548 bool parcelOwned = scope == ScriptBaseClass.AGENT_LIST_PARCEL_OWNER;
5549 bool parcel = scope == ScriptBaseClass.AGENT_LIST_PARCEL;
5550
5551 LSL_List result = new LSL_List();
5552
5553 if (!regionWide && !parcelOwned && !parcel)
5554 {
5555 result.Add("INVALID_SCOPE");
5556 return result;
5557 }
5558
5559 ILandObject land;
5560 Vector3 pos;
5561 UUID id = UUID.Zero;
5562 if (parcel || parcelOwned)
5563 {
5564 pos = m_host.ParentGroup.RootPart.GetWorldPosition();
5565 land = World.LandChannel.GetLandObject(pos.X, pos.Y);
5566 if (land == null)
5567 {
5568 id = UUID.Zero;
5569 }
5570 else
5571 {
5572 if (parcelOwned)
5573 {
5574 id = land.LandData.OwnerID;
5575 }
5576 else
5577 {
5578 id = land.LandData.GlobalID;
5579 }
5580 }
5581 }
5582 List<UUID> presenceIds = new List<UUID>();
5583
5584 World.ForEachRootScenePresence(
5585 delegate (ScenePresence ssp)
5586 {
5587 // Gods are not listed in SL
5588 if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent)
5589 {
5590 if (!regionWide)
5591 {
5592 pos = ssp.AbsolutePosition;
5593 land = World.LandChannel.GetLandObject(pos.X, pos.Y);
5594 if (land != null)
5595 {
5596 if (parcelOwned && land.LandData.OwnerID == id ||
5597 parcel && land.LandData.GlobalID == id)
5598 {
5599 result.Add(ssp.UUID.ToString());
5600 }
5601 }
5602 }
5603 else
5604 {
5605 result.Add(ssp.UUID.ToString());
5606 }
5607 }
5608 // Maximum of 100 results
5609 if (result.Length > 99)
5610 {
5611 return;
5612 }
5613 }
5614 );
5615 return result;
5616 }
5532 5617
5533 public void llAdjustSoundVolume(double volume) 5618 public void llAdjustSoundVolume(double volume)
5534 { 5619 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 7a797ac..7f5d1fe 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 2a28542..b6c21e6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -501,6 +501,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
501 public const int OBJECT_STREAMING_COST = 15; 501 public const int OBJECT_STREAMING_COST = 15;
502 public const int OBJECT_PHYSICS_COST = 16; 502 public const int OBJECT_PHYSICS_COST = 16;
503 503
504 // for llGetAgentList
505 public const int AGENT_LIST_PARCEL = 1;
506 public const int AGENT_LIST_PARCEL_OWNER = 2;
507 public const int AGENT_LIST_REGION = 4;
508
504 // Can not be public const? 509 // Can not be public const?
505 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); 510 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);
506 public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0); 511 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 80fa530..c0bf29c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -389,6 +389,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
389 return m_LSL_Functions.llGetAgentLanguage(id); 389 return m_LSL_Functions.llGetAgentLanguage(id);
390 } 390 }
391 391
392 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
393 {
394 return m_LSL_Functions.llGetAgentList(scope, options);
395 }
396
392 public LSL_Vector llGetAgentSize(string id) 397 public LSL_Vector llGetAgentSize(string id)
393 { 398 {
394 return m_LSL_Functions.llGetAgentSize(id); 399 return m_LSL_Functions.llGetAgentSize(id);