diff options
author | Teravus Ovares | 2008-06-10 00:18:00 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-10 00:18:00 +0000 |
commit | 8a93358405ba97697ece87887d2a36fadfeaca4f (patch) | |
tree | 9ced55cc99a902d2f51293301815abf760c5a239 /OpenSim/Region/Environment/Scenes/InnerScene.cs | |
parent | actually create and populate the migrations table correctly. (diff) | |
download | opensim-SC-8a93358405ba97697ece87887d2a36fadfeaca4f.zip opensim-SC-8a93358405ba97697ece87887d2a36fadfeaca4f.tar.gz opensim-SC-8a93358405ba97697ece87887d2a36fadfeaca4f.tar.bz2 opensim-SC-8a93358405ba97697ece87887d2a36fadfeaca4f.tar.xz |
* This completes ObjectDuplicateOnRay.
* In English, that means that Copy Selection works now, including Copy Centers and Copy Rotates.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index d7a6d5b..3cd32c6 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -1399,7 +1399,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | /// <summary> | 1401 | /// <summary> |
1402 | /// Duplicate the given object. | 1402 | /// Duplicate the given object, Fire and Forget, No rotation, no return wrapper |
1403 | /// </summary> | 1403 | /// </summary> |
1404 | /// <param name="originalPrim"></param> | 1404 | /// <param name="originalPrim"></param> |
1405 | /// <param name="offset"></param> | 1405 | /// <param name="offset"></param> |
@@ -1408,6 +1408,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1408 | { | 1408 | { |
1409 | //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); | 1409 | //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); |
1410 | 1410 | ||
1411 | SceneObjectGroup dupe = DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Zero); | ||
1412 | } | ||
1413 | /// <summary> | ||
1414 | /// Duplicate the given object. | ||
1415 | /// </summary> | ||
1416 | /// <param name="originalPrim"></param> | ||
1417 | /// <param name="offset"></param> | ||
1418 | /// <param name="flags"></param> | ||
1419 | protected internal SceneObjectGroup DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID, Quaternion rot) | ||
1420 | { | ||
1421 | //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); | ||
1422 | |||
1411 | List<EntityBase> EntityList = GetEntities(); | 1423 | List<EntityBase> EntityList = GetEntities(); |
1412 | 1424 | ||
1413 | SceneObjectGroup originPrim = null; | 1425 | SceneObjectGroup originPrim = null; |
@@ -1445,16 +1457,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
1445 | 1457 | ||
1446 | m_numPrim += copy.Children.Count; | 1458 | m_numPrim += copy.Children.Count; |
1447 | 1459 | ||
1460 | if (rot != Quaternion.Zero) | ||
1461 | { | ||
1462 | copy.UpdateGroupRotation(new LLQuaternion(rot.x, rot.y, rot.z, rot.w)); | ||
1463 | } | ||
1464 | |||
1448 | copy.StartScripts(); | 1465 | copy.StartScripts(); |
1449 | copy.ScheduleGroupForFullUpdate(); | 1466 | copy.ScheduleGroupForFullUpdate(); |
1467 | return copy; | ||
1450 | } | 1468 | } |
1451 | } | 1469 | } |
1452 | else | 1470 | else |
1453 | { | 1471 | { |
1454 | m_log.WarnFormat("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID); | 1472 | m_log.WarnFormat("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID); |
1455 | } | 1473 | } |
1474 | return null; | ||
1456 | } | 1475 | } |
1457 | |||
1458 | /// <summary> | 1476 | /// <summary> |
1459 | /// Calculates the distance between two Vector3s | 1477 | /// Calculates the distance between two Vector3s |
1460 | /// </summary> | 1478 | /// </summary> |