diff options
author | Justin Clark-Casey (justincc) | 2011-05-21 00:02:53 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-21 00:02:53 +0100 |
commit | 90567a9eaac717ab86316c078e148f8fe13432ac (patch) | |
tree | 3a87213e6a946c25b6a029dbf911b75038b8a070 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | refactor TestRezObjectFromInventoryItem() (diff) | |
download | opensim-SC_OLD-90567a9eaac717ab86316c078e148f8fe13432ac.zip opensim-SC_OLD-90567a9eaac717ab86316c078e148f8fe13432ac.tar.gz opensim-SC_OLD-90567a9eaac717ab86316c078e148f8fe13432ac.tar.bz2 opensim-SC_OLD-90567a9eaac717ab86316c078e148f8fe13432ac.tar.xz |
refactor Scene.RezObject() to use AddNewSceneObject() rather than copy/pasting code with small differences
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7b88f4f..3c47873 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2095,19 +2095,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2095 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); | 2095 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); |
2096 | } | 2096 | } |
2097 | 2097 | ||
2098 | AddNewSceneObject(group, true); | 2098 | AddNewSceneObject(group, true, pos, rot, vel); |
2099 | |||
2100 | group.AbsolutePosition = pos; | ||
2101 | group.Velocity = vel; | ||
2102 | |||
2103 | if (rot != null) | ||
2104 | group.UpdateGroupRotationR((Quaternion)rot); | ||
2105 | |||
2106 | // TODO: This needs to be refactored with the similar code in | ||
2107 | // SceneGraph.AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) | ||
2108 | // possibly by allowing this method to take a null rotation. | ||
2109 | if (group.RootPart.PhysActor != null && group.RootPart.PhysActor.IsPhysical && vel != Vector3.Zero) | ||
2110 | group.RootPart.ApplyImpulse((vel * group.GetMass()), false); | ||
2111 | 2099 | ||
2112 | // We can only call this after adding the scene object, since the scene object references the scene | 2100 | // We can only call this after adding the scene object, since the scene object references the scene |
2113 | // to find out if scripts should be activated at all. | 2101 | // to find out if scripts should be activated at all. |