diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e4fdc31..725efb4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1311,6 +1311,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1311 | { | 1311 | { |
1312 | rootPart.AddFlag(LLObject.ObjectFlags.Phantom); | 1312 | rootPart.AddFlag(LLObject.ObjectFlags.Phantom); |
1313 | //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom; | 1313 | //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom; |
1314 | if (rootPart.Shape.PCode != (byte)PCode.Grass) | ||
1315 | AdaptTree(ref shape); | ||
1314 | } | 1316 | } |
1315 | // if not phantom, add to physics | 1317 | // if not phantom, add to physics |
1316 | sceneOb.ApplyPhysics(m_physicalPrim); | 1318 | sceneOb.ApplyPhysics(m_physicalPrim); |
@@ -1319,6 +1321,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
1319 | return sceneOb; | 1321 | return sceneOb; |
1320 | } | 1322 | } |
1321 | 1323 | ||
1324 | void AdaptTree(ref PrimitiveBaseShape tree) | ||
1325 | { | ||
1326 | // Tree size has to be adapted depending on its type | ||
1327 | switch((Tree)tree.State) | ||
1328 | { | ||
1329 | case Tree.Cypress1: | ||
1330 | case Tree.Cypress2: | ||
1331 | tree.Scale = new LLVector3(4, 4, 10); | ||
1332 | break; | ||
1333 | |||
1334 | // case... other tree types | ||
1335 | // tree.Scale = new LLVector3(?, ?, ?); | ||
1336 | // break; | ||
1337 | |||
1338 | default: | ||
1339 | tree.Scale = new LLVector3(4, 4, 4); | ||
1340 | break; | ||
1341 | } | ||
1342 | } | ||
1343 | |||
1322 | public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, | 1344 | public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, |
1323 | Tree treeType, bool newTree) | 1345 | Tree treeType, bool newTree) |
1324 | { | 1346 | { |