diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index af13b46..e599e90 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -342,7 +342,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
342 | public bool AddNewSceneObject( | 342 | public bool AddNewSceneObject( |
343 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel) | 343 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel) |
344 | { | 344 | { |
345 | AddNewSceneObject(sceneObject, true, false); | 345 | AddNewSceneObject(sceneObject, attachToBackup, false); |
346 | 346 | ||
347 | if (pos != null) | 347 | if (pos != null) |
348 | sceneObject.AbsolutePosition = (Vector3)pos; | 348 | sceneObject.AbsolutePosition = (Vector3)pos; |
@@ -421,12 +421,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
421 | { | 421 | { |
422 | Vector3 scale = part.Shape.Scale; | 422 | Vector3 scale = part.Shape.Scale; |
423 | 423 | ||
424 | if (scale.X > m_parentScene.m_maxNonphys) | 424 | scale.X = Math.Max(m_parentScene.m_minNonphys, Math.Min(m_parentScene.m_maxNonphys, scale.X)); |
425 | scale.X = m_parentScene.m_maxNonphys; | 425 | scale.Y = Math.Max(m_parentScene.m_minNonphys, Math.Min(m_parentScene.m_maxNonphys, scale.Y)); |
426 | if (scale.Y > m_parentScene.m_maxNonphys) | 426 | scale.Z = Math.Max(m_parentScene.m_minNonphys, Math.Min(m_parentScene.m_maxNonphys, scale.Z)); |
427 | scale.Y = m_parentScene.m_maxNonphys; | ||
428 | if (scale.Z > m_parentScene.m_maxNonphys) | ||
429 | scale.Z = m_parentScene.m_maxNonphys; | ||
430 | 427 | ||
431 | part.Shape.Scale = scale; | 428 | part.Shape.Scale = scale; |
432 | } | 429 | } |
@@ -1066,6 +1063,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
1066 | } | 1063 | } |
1067 | 1064 | ||
1068 | /// <summary> | 1065 | /// <summary> |
1066 | /// Get a group in the scene | ||
1067 | /// </summary> | ||
1068 | /// <remarks> | ||
1069 | /// This will only return a group if the local ID matches the root part, not other parts. | ||
1070 | /// </remarks> | ||
1071 | /// <param name="localID">Local id of the root part of the group</param> | ||
1072 | /// <returns>null if no such group was found</returns> | ||
1073 | protected internal SceneObjectGroup GetSceneObjectGroup(uint localID) | ||
1074 | { | ||
1075 | lock (SceneObjectGroupsByLocalPartID) | ||
1076 | { | ||
1077 | if (SceneObjectGroupsByLocalPartID.ContainsKey(localID)) | ||
1078 | { | ||
1079 | SceneObjectGroup so = SceneObjectGroupsByLocalPartID[localID]; | ||
1080 | |||
1081 | if (so.LocalId == localID) | ||
1082 | return so; | ||
1083 | } | ||
1084 | } | ||
1085 | |||
1086 | return null; | ||
1087 | } | ||
1088 | |||
1089 | /// <summary> | ||
1069 | /// Get a group by name from the scene (will return the first | 1090 | /// Get a group by name from the scene (will return the first |
1070 | /// found, if there are more than one prim with the same name) | 1091 | /// found, if there are more than one prim with the same name) |
1071 | /// </summary> | 1092 | /// </summary> |