some steps to rez center or root of prim inventory object at requested

position ( does nothing diferent still )
avinationmerge
UbitUmarov 2014-11-19 16:59:11 +00:00
parent b4a91f5dde
commit 7bcb68d7c4
3 changed files with 11 additions and 8 deletions

View File

@ -2447,7 +2447,7 @@ namespace OpenSim.Region.Framework.Scenes
RayStart, RayEnd, RayTargetID, Quaternion.Identity, RayStart, RayEnd, RayTargetID, Quaternion.Identity,
BypassRayCast, bRayEndIsIntersection, true, scale, false); BypassRayCast, bRayEndIsIntersection, true, scale, false);
RezObject(part, item, pos, null, Vector3.Zero, 0); RezObject(part, item, pos, null, Vector3.Zero, 0, false);
} }
} }
@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="param"></param> /// <param name="param"></param>
/// <returns>The SceneObjectGroup(s) rezzed, or null if rez was unsuccessful</returns> /// <returns>The SceneObjectGroup(s) rezzed, or null if rez was unsuccessful</returns>
public virtual List<SceneObjectGroup> RezObject( public virtual List<SceneObjectGroup> RezObject(
SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param) SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param, bool atRoot)
{ {
if (null == item) if (null == item)
return null; return null;
@ -2474,6 +2474,7 @@ namespace OpenSim.Region.Framework.Scenes
float offsetHeight; float offsetHeight;
bool success = sourcePart.Inventory.GetRezReadySceneObjects(item, out objlist, out veclist,out bbox, out offsetHeight); bool success = sourcePart.Inventory.GetRezReadySceneObjects(item, out objlist, out veclist,out bbox, out offsetHeight);
if (!success) if (!success)
return null; return null;

View File

@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Tests
Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f);
Vector3 rezVel = new Vector3(2, 2, 2); Vector3 rezVel = new Vector3(2, 2, 2);
scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0); scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0,false);
SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso"); SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso");

View File

@ -3233,6 +3233,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
{
doObjectRez(inventory, pos, vel, rot, param, true);
}
public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -3260,10 +3265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
} }
// need the magnitude later List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param, atRoot);
// float velmag = (float)Util.GetMagnitude(llvel);
List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param);
// If either of these are null, then there was an unknown error. // If either of these are null, then there was an unknown error.
if (new_groups == null) if (new_groups == null)
@ -3311,7 +3313,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
{ {
llRezAtRoot(inventory, pos, vel, rot, param); doObjectRez(inventory, pos, vel, rot, param, false);
} }
public void llLookAt(LSL_Vector target, double strength, double damping) public void llLookAt(LSL_Vector target, double strength, double damping)