aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs3
2 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index fc3b9dd..cb69b47 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -98,8 +98,11 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
98 { 98 {
99 if (args[0] == "tree") 99 if (args[0] == "tree")
100 { 100 {
101 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
102 if(uuid == LLUUID.Zero)
103 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
101 m_log.Debug("[TREES]: New tree planting"); 104 m_log.Debug("[TREES]: New tree planting");
102 CreateTree(new LLVector3(128.0f, 128.0f, 0.0f)); 105 CreateTree(uuid, new LLVector3(128.0f, 128.0f, 0.0f));
103 } 106 }
104 } 107 }
105 108
@@ -220,15 +223,19 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
220 position.X += (float) randX; 223 position.X += (float) randX;
221 position.Y += (float) randY; 224 position.Y += (float) randY;
222 225
223 CreateTree(position); 226 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
227 if(uuid == LLUUID.Zero)
228 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
229
230 CreateTree(uuid, position);
224 } 231 }
225 232
226 private void CreateTree(LLVector3 position) 233 private void CreateTree(LLUUID uuid, LLVector3 position)
227 { 234 {
228 position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y]; 235 position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y];
229 236
230 SceneObjectGroup tree = 237 SceneObjectGroup tree =
231 m_scene.AddTree(new LLVector3(0.1f, 0.1f, 0.1f), 238 m_scene.AddTree(uuid, new LLVector3(0.1f, 0.1f, 0.1f),
232 LLQuaternion.Identity, 239 LLQuaternion.Identity,
233 position, 240 position,
234 Tree.Cypress1, 241 Tree.Cypress1,
@@ -245,4 +252,4 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
245 killTrees(); 252 killTrees();
246 } 253 }
247 } 254 }
248} \ No newline at end of file 255}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index b4bb2f6..bd02b7e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1635,10 +1635,9 @@ namespace OpenSim.Region.Environment.Scenes
1635 } 1635 }
1636 } 1636 }
1637 1637
1638 public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, 1638 public SceneObjectGroup AddTree(LLUUID uuid, LLVector3 scale, LLQuaternion rotation, LLVector3 position,
1639 Tree treeType, bool newTree) 1639 Tree treeType, bool newTree)
1640 { 1640 {
1641 LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID;
1642 PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); 1641 PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
1643 treeShape.PathCurve = 16; 1642 treeShape.PathCurve = 16;
1644 treeShape.PathEnd = 49900; 1643 treeShape.PathEnd = 49900;