diff options
author | Charles Krinke | 2008-06-04 14:34:35 +0000 |
---|---|---|
committer | Charles Krinke | 2008-06-04 14:34:35 +0000 |
commit | bc323957754751ddcd37838b371daba537c15c5c (patch) | |
tree | 2fd1c8b0cd901be6fb5f2ddaabdeaa5e2fe8f31d /OpenSim/Region | |
parent | Mantis#1439. Thank you kindly, Melanie for a patch that (diff) | |
download | opensim-SC-bc323957754751ddcd37838b371daba537c15c5c.zip opensim-SC-bc323957754751ddcd37838b371daba537c15c5c.tar.gz opensim-SC-bc323957754751ddcd37838b371daba537c15c5c.tar.bz2 opensim-SC-bc323957754751ddcd37838b371daba537c15c5c.tar.xz |
Mantis#1446. Thank you kindly, Grumly57 for a patch
that solves "trees are too small when rezzed"
Diffstat (limited to '')
-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 | { |