Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
0dfccfc1d9
|
@ -700,6 +700,7 @@ namespace OpenSim
|
||||||
scene.LoadWorldMap();
|
scene.LoadWorldMap();
|
||||||
|
|
||||||
scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
|
scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
|
||||||
|
scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset;
|
||||||
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
||||||
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
|
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
|
||||||
|
|
||||||
|
|
|
@ -2131,7 +2131,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||||
sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
|
sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group.RezzingObjectID = sourcePart.UUID;
|
||||||
AddNewSceneObject(group, true, pos, rot, vel);
|
AddNewSceneObject(group, true, pos, rot, vel);
|
||||||
|
|
||||||
// We can only call this after adding the scene object, since the scene object references the scene
|
// We can only call this after adding the scene object, since the scene object references the scene
|
||||||
|
|
|
@ -5421,5 +5421,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_SpawnPoint = 1;
|
m_SpawnPoint = 1;
|
||||||
return m_SpawnPoint - 1;
|
return m_SpawnPoint - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wrappers to get physics modules retrieve assets. Has to be done this way
|
||||||
|
// because we can't assign the asset service to physics directly - at the
|
||||||
|
// time physics are instantiated it's not registered but it will be by
|
||||||
|
// the time the first prim exists.
|
||||||
|
public void PhysicsRequestAsset(UUID assetID, AssetReceivedDelegate callback)
|
||||||
|
{
|
||||||
|
AssetService.Get(assetID.ToString(), callback, PhysicsAssetReceived);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PhysicsAssetReceived(string id, Object sender, AssetBase asset)
|
||||||
|
{
|
||||||
|
AssetReceivedDelegate callback = (AssetReceivedDelegate)sender;
|
||||||
|
|
||||||
|
callback(asset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -610,6 +611,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public UUID FromItemID { get; set; }
|
public UUID FromItemID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Refers to the SceneObjectPart.UUID property of the object that this object was rezzed from, if applicable.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// If not applicable will be UUID.Zero
|
||||||
|
/// </remarks>
|
||||||
|
public UUID RezzingObjectID { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The folder ID that this object was rezzed from, if applicable.
|
/// The folder ID that this object was rezzed from, if applicable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -633,6 +642,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SceneObjectGroup()
|
public SceneObjectGroup()
|
||||||
{
|
{
|
||||||
|
RezzingObjectID = UUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -640,7 +650,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// The original SceneObjectPart will be used rather than a copy, preserving
|
/// The original SceneObjectPart will be used rather than a copy, preserving
|
||||||
/// its existing localID and UUID.
|
/// its existing localID and UUID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SceneObjectGroup(SceneObjectPart part)
|
public SceneObjectGroup(SceneObjectPart part) : this()
|
||||||
{
|
{
|
||||||
SetRootPart(part);
|
SetRootPart(part);
|
||||||
}
|
}
|
||||||
|
@ -648,9 +658,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor. This object is added to the scene later via AttachToScene()
|
/// Constructor. This object is added to the scene later via AttachToScene()
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SceneObjectGroup(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
|
public SceneObjectGroup(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) :this(new SceneObjectPart(ownerID, shape, pos, rot, Vector3.Zero))
|
||||||
{
|
{
|
||||||
SetRootPart(new SceneObjectPart(ownerID, shape, pos, rot, Vector3.Zero));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -43,6 +43,9 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
public delegate void JointDeactivated(PhysicsJoint joint);
|
public delegate void JointDeactivated(PhysicsJoint joint);
|
||||||
public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
|
public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
|
||||||
|
|
||||||
|
public delegate void RequestAssetDelegate(UUID assetID, AssetReceivedDelegate callback);
|
||||||
|
public delegate void AssetReceivedDelegate(AssetBase asset);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contact result from a raycast.
|
/// Contact result from a raycast.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -73,6 +76,8 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
get { return new NullPhysicsScene(); }
|
get { return new NullPhysicsScene(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RequestAssetDelegate RequestAssetMethod { private get; set; }
|
||||||
|
|
||||||
public virtual void TriggerPhysicsBasedRestart()
|
public virtual void TriggerPhysicsBasedRestart()
|
||||||
{
|
{
|
||||||
physicsCrash handler = OnPhysicsCrash;
|
physicsCrash handler = OnPhysicsCrash;
|
||||||
|
|
|
@ -3314,5 +3314,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
return Math.Max(a, b);
|
return Math.Max(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Key osGetRezzingObject()
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject");
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
return new LSL_Key(m_host.ParentGroup.RezzingObjectID.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -299,5 +299,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
/// <param name="b"></param>
|
/// <param name="b"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
LSL_Float osMax(double a, double b);
|
LSL_Float osMax(double a, double b);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the key of the object that rezzed this object.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns>
|
||||||
|
LSL_Key osGetRezzingObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -945,5 +945,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osMax(a, b);
|
return m_OSSL_Functions.osMax(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Key osGetRezzingObject()
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osGetRezzingObject();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue