diff options
author | Justin Clark-Casey (justincc) | 2012-08-02 23:54:32 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-02 23:54:32 +0100 |
commit | 0dfccfc1d9f1e2096eb05508f3e0b60c7b339c81 (patch) | |
tree | 88d593f56cbaca2c2ba796d87d91f3b5c17c22de /OpenSim | |
parent | Add simple draw test for the VectorRenderModule (diff) | |
parent | Initialize the Rezzing object to UUID.Zero (diff) | |
download | opensim-SC-0dfccfc1d9f1e2096eb05508f3e0b60c7b339c81.zip opensim-SC-0dfccfc1d9f1e2096eb05508f3e0b60c7b339c81.tar.gz opensim-SC-0dfccfc1d9f1e2096eb05508f3e0b60c7b339c81.tar.bz2 opensim-SC-0dfccfc1d9f1e2096eb05508f3e0b60c7b339c81.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
8 files changed, 55 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 4084741..37cfe1d 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -700,6 +700,7 @@ namespace OpenSim | |||
700 | scene.LoadWorldMap(); | 700 | scene.LoadWorldMap(); |
701 | 701 | ||
702 | scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); | 702 | scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); |
703 | scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset; | ||
703 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); | 704 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); |
704 | scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); | 705 | scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); |
705 | 706 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index d18fffd..a2016da 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2131,7 +2131,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2131 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 2131 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
2132 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); | 2132 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); |
2133 | } | 2133 | } |
2134 | 2134 | ||
2135 | group.RezzingObjectID = sourcePart.UUID; | ||
2135 | AddNewSceneObject(group, true, pos, rot, vel); | 2136 | AddNewSceneObject(group, true, pos, rot, vel); |
2136 | 2137 | ||
2137 | // We can only call this after adding the scene object, since the scene object references the scene | 2138 | // We can only call this after adding the scene object, since the scene object references the scene |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index eb4ba41..c77457c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5421,5 +5421,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
5421 | m_SpawnPoint = 1; | 5421 | m_SpawnPoint = 1; |
5422 | return m_SpawnPoint - 1; | 5422 | return m_SpawnPoint - 1; |
5423 | } | 5423 | } |
5424 | |||
5425 | // Wrappers to get physics modules retrieve assets. Has to be done this way | ||
5426 | // because we can't assign the asset service to physics directly - at the | ||
5427 | // time physics are instantiated it's not registered but it will be by | ||
5428 | // the time the first prim exists. | ||
5429 | public void PhysicsRequestAsset(UUID assetID, AssetReceivedDelegate callback) | ||
5430 | { | ||
5431 | AssetService.Get(assetID.ToString(), callback, PhysicsAssetReceived); | ||
5432 | } | ||
5433 | |||
5434 | private void PhysicsAssetReceived(string id, Object sender, AssetBase asset) | ||
5435 | { | ||
5436 | AssetReceivedDelegate callback = (AssetReceivedDelegate)sender; | ||
5437 | |||
5438 | callback(asset); | ||
5439 | } | ||
5424 | } | 5440 | } |
5425 | } | 5441 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 52469a2..13cc5cd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.ComponentModel; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Drawing; | 31 | using System.Drawing; |
31 | using System.IO; | 32 | using System.IO; |
@@ -611,6 +612,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
611 | public UUID FromItemID { get; set; } | 612 | public UUID FromItemID { get; set; } |
612 | 613 | ||
613 | /// <summary> | 614 | /// <summary> |
615 | /// Refers to the SceneObjectPart.UUID property of the object that this object was rezzed from, if applicable. | ||
616 | /// </summary> | ||
617 | /// <remarks> | ||
618 | /// If not applicable will be UUID.Zero | ||
619 | /// </remarks> | ||
620 | public UUID RezzingObjectID { get; set; } | ||
621 | |||
622 | /// <summary> | ||
614 | /// The folder ID that this object was rezzed from, if applicable. | 623 | /// The folder ID that this object was rezzed from, if applicable. |
615 | /// </summary> | 624 | /// </summary> |
616 | /// <remarks> | 625 | /// <remarks> |
@@ -633,6 +642,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
633 | /// </summary> | 642 | /// </summary> |
634 | public SceneObjectGroup() | 643 | public SceneObjectGroup() |
635 | { | 644 | { |
645 | RezzingObjectID = UUID.Zero; | ||
636 | } | 646 | } |
637 | 647 | ||
638 | /// <summary> | 648 | /// <summary> |
@@ -640,7 +650,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
640 | /// The original SceneObjectPart will be used rather than a copy, preserving | 650 | /// The original SceneObjectPart will be used rather than a copy, preserving |
641 | /// its existing localID and UUID. | 651 | /// its existing localID and UUID. |
642 | /// </summary> | 652 | /// </summary> |
643 | public SceneObjectGroup(SceneObjectPart part) | 653 | public SceneObjectGroup(SceneObjectPart part) : this() |
644 | { | 654 | { |
645 | SetRootPart(part); | 655 | SetRootPart(part); |
646 | } | 656 | } |
@@ -648,9 +658,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
648 | /// <summary> | 658 | /// <summary> |
649 | /// Constructor. This object is added to the scene later via AttachToScene() | 659 | /// Constructor. This object is added to the scene later via AttachToScene() |
650 | /// </summary> | 660 | /// </summary> |
651 | public SceneObjectGroup(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) | 661 | public SceneObjectGroup(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) :this(new SceneObjectPart(ownerID, shape, pos, rot, Vector3.Zero)) |
652 | { | 662 | { |
653 | SetRootPart(new SceneObjectPart(ownerID, shape, pos, rot, Vector3.Zero)); | ||
654 | } | 663 | } |
655 | 664 | ||
656 | /// <summary> | 665 | /// <summary> |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index b32cd30..6a0558a 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -43,6 +43,9 @@ namespace OpenSim.Region.Physics.Manager | |||
43 | public delegate void JointDeactivated(PhysicsJoint joint); | 43 | public delegate void JointDeactivated(PhysicsJoint joint); |
44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" | 44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" |
45 | 45 | ||
46 | public delegate void RequestAssetDelegate(UUID assetID, AssetReceivedDelegate callback); | ||
47 | public delegate void AssetReceivedDelegate(AssetBase asset); | ||
48 | |||
46 | /// <summary> | 49 | /// <summary> |
47 | /// Contact result from a raycast. | 50 | /// Contact result from a raycast. |
48 | /// </summary> | 51 | /// </summary> |
@@ -73,6 +76,8 @@ namespace OpenSim.Region.Physics.Manager | |||
73 | get { return new NullPhysicsScene(); } | 76 | get { return new NullPhysicsScene(); } |
74 | } | 77 | } |
75 | 78 | ||
79 | public RequestAssetDelegate RequestAssetMethod { private get; set; } | ||
80 | |||
76 | public virtual void TriggerPhysicsBasedRestart() | 81 | public virtual void TriggerPhysicsBasedRestart() |
77 | { | 82 | { |
78 | physicsCrash handler = OnPhysicsCrash; | 83 | physicsCrash handler = OnPhysicsCrash; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 44de176..e5a4fe8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3314,5 +3314,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3314 | 3314 | ||
3315 | return Math.Max(a, b); | 3315 | return Math.Max(a, b); |
3316 | } | 3316 | } |
3317 | |||
3318 | public LSL_Key osGetRezzingObject() | ||
3319 | { | ||
3320 | CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); | ||
3321 | m_host.AddScriptLPS(1); | ||
3322 | |||
3323 | return new LSL_Key(m_host.ParentGroup.RezzingObjectID.ToString()); | ||
3324 | } | ||
3317 | } | 3325 | } |
3318 | } \ No newline at end of file | 3326 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index f73a85e..1f000a3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -299,5 +299,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
299 | /// <param name="b"></param> | 299 | /// <param name="b"></param> |
300 | /// <returns></returns> | 300 | /// <returns></returns> |
301 | LSL_Float osMax(double a, double b); | 301 | LSL_Float osMax(double a, double b); |
302 | |||
303 | /// <summary> | ||
304 | /// Get the key of the object that rezzed this object. | ||
305 | /// </summary> | ||
306 | /// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns> | ||
307 | LSL_Key osGetRezzingObject(); | ||
302 | } | 308 | } |
303 | } | 309 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 53daa13..94405d2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -945,5 +945,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
945 | { | 945 | { |
946 | return m_OSSL_Functions.osMax(a, b); | 946 | return m_OSSL_Functions.osMax(a, b); |
947 | } | 947 | } |
948 | |||
949 | public LSL_Key osGetRezzingObject() | ||
950 | { | ||
951 | return m_OSSL_Functions.osGetRezzingObject(); | ||
952 | } | ||
948 | } | 953 | } |
949 | } | 954 | } |