aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2014-11-19 16:59:11 +0000
committerUbitUmarov2014-11-19 16:59:11 +0000
commit7bcb68d7c496cdf2979918a12cb9dc4929bfcdc3 (patch)
treebe01104d26caabf3d6a733bfbdebea4d7cdcbb00 /OpenSim/Region
parent return bbox and offsetHeight to RezObject (diff)
downloadopensim-SC-7bcb68d7c496cdf2979918a12cb9dc4929bfcdc3.zip
opensim-SC-7bcb68d7c496cdf2979918a12cb9dc4929bfcdc3.tar.gz
opensim-SC-7bcb68d7c496cdf2979918a12cb9dc4929bfcdc3.tar.bz2
opensim-SC-7bcb68d7c496cdf2979918a12cb9dc4929bfcdc3.tar.xz
some steps to rez center or root of prim inventory object at requested
position ( does nothing diferent still )
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
3 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index abf19d8..9721edb 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2447,7 +2447,7 @@ namespace OpenSim.Region.Framework.Scenes
2447 RayStart, RayEnd, RayTargetID, Quaternion.Identity, 2447 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
2448 BypassRayCast, bRayEndIsIntersection, true, scale, false); 2448 BypassRayCast, bRayEndIsIntersection, true, scale, false);
2449 2449
2450 RezObject(part, item, pos, null, Vector3.Zero, 0); 2450 RezObject(part, item, pos, null, Vector3.Zero, 0, false);
2451 } 2451 }
2452 } 2452 }
2453 2453
@@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Framework.Scenes
2463 /// <param name="param"></param> 2463 /// <param name="param"></param>
2464 /// <returns>The SceneObjectGroup(s) rezzed, or null if rez was unsuccessful</returns> 2464 /// <returns>The SceneObjectGroup(s) rezzed, or null if rez was unsuccessful</returns>
2465 public virtual List<SceneObjectGroup> RezObject( 2465 public virtual List<SceneObjectGroup> RezObject(
2466 SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param) 2466 SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param, bool atRoot)
2467 { 2467 {
2468 if (null == item) 2468 if (null == item)
2469 return null; 2469 return null;
@@ -2474,6 +2474,7 @@ namespace OpenSim.Region.Framework.Scenes
2474 float offsetHeight; 2474 float offsetHeight;
2475 2475
2476 bool success = sourcePart.Inventory.GetRezReadySceneObjects(item, out objlist, out veclist,out bbox, out offsetHeight); 2476 bool success = sourcePart.Inventory.GetRezReadySceneObjects(item, out objlist, out veclist,out bbox, out offsetHeight);
2477
2477 if (!success) 2478 if (!success)
2478 return null; 2479 return null;
2479 2480
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index 6e0ea7d..020bb6c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Tests
97 Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); 97 Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f);
98 Vector3 rezVel = new Vector3(2, 2, 2); 98 Vector3 rezVel = new Vector3(2, 2, 2);
99 99
100 scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0); 100 scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0,false);
101 101
102 SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso"); 102 SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso");
103 103
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5141e0e..667a562 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3234,6 +3234,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3234 3234
3235 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) 3235 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
3236 { 3236 {
3237 doObjectRez(inventory, pos, vel, rot, param, true);
3238 }
3239
3240 public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot)
3241 {
3237 m_host.AddScriptLPS(1); 3242 m_host.AddScriptLPS(1);
3238 3243
3239 Util.FireAndForget(x => 3244 Util.FireAndForget(x =>
@@ -3260,10 +3265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3260 return; 3265 return;
3261 } 3266 }
3262 3267
3263 // need the magnitude later 3268 List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param, atRoot);
3264 // float velmag = (float)Util.GetMagnitude(llvel);
3265
3266 List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param);
3267 3269
3268 // If either of these are null, then there was an unknown error. 3270 // If either of these are null, then there was an unknown error.
3269 if (new_groups == null) 3271 if (new_groups == null)
@@ -3311,7 +3313,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3311 3313
3312 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) 3314 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
3313 { 3315 {
3314 llRezAtRoot(inventory, pos, vel, rot, param); 3316 doObjectRez(inventory, pos, vel, rot, param, false);
3315 } 3317 }
3316 3318
3317 public void llLookAt(LSL_Vector target, double strength, double damping) 3319 public void llLookAt(LSL_Vector target, double strength, double damping)