diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/TreePopulator')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index e4a3382..e22c6ea 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -45,7 +45,7 @@ using System.IO; | |||
45 | namespace OpenSim.Region.OptionalModules.World.TreePopulator | 45 | namespace OpenSim.Region.OptionalModules.World.TreePopulator |
46 | { | 46 | { |
47 | /// <summary> | 47 | /// <summary> |
48 | /// Version 2.02 - Still hacky | 48 | /// Version 2.02 - Still hacky |
49 | /// </summary> | 49 | /// </summary> |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")] |
51 | public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule | 51 | public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule |
@@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
60 | public string m_name; | 60 | public string m_name; |
61 | public Boolean m_frozen; | 61 | public Boolean m_frozen; |
62 | public Tree m_tree_type; | 62 | public Tree m_tree_type; |
63 | public int m_tree_quantity; | 63 | public int m_tree_quantity; |
64 | public float m_treeline_low; | 64 | public float m_treeline_low; |
65 | public float m_treeline_high; | 65 | public float m_treeline_high; |
66 | public Vector3 m_seed_point; | 66 | public Vector3 m_seed_point; |
@@ -78,7 +78,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
78 | { | 78 | { |
79 | } | 79 | } |
80 | 80 | ||
81 | public Copse(string fileName, Boolean planted) | 81 | public Copse(string fileName, Boolean planted) |
82 | { | 82 | { |
83 | Copse cp = (Copse)DeserializeObject(fileName); | 83 | Copse cp = (Copse)DeserializeObject(fileName); |
84 | 84 | ||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
139 | { | 139 | { |
140 | string frozen = (this.m_frozen ? "F" : "A"); | 140 | string frozen = (this.m_frozen ? "F" : "A"); |
141 | 141 | ||
142 | return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};", | 142 | return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};", |
143 | frozen, | 143 | frozen, |
144 | this.m_name, | 144 | this.m_name, |
145 | this.m_tree_quantity, | 145 | this.m_tree_quantity, |
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
156 | 156 | ||
157 | private List<Copse> m_copse; | 157 | private List<Copse> m_copse; |
158 | 158 | ||
159 | private double m_update_ms = 1000.0; // msec between updates | 159 | private double m_update_ms = 1000.0; // msec between updates |
160 | private bool m_active_trees = false; | 160 | private bool m_active_trees = false; |
161 | 161 | ||
162 | Timer CalculateTrees; | 162 | Timer CalculateTrees; |
@@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
174 | 174 | ||
175 | public void Initialise(IConfigSource config) | 175 | public void Initialise(IConfigSource config) |
176 | { | 176 | { |
177 | 177 | ||
178 | // ini file settings | 178 | // ini file settings |
179 | try | 179 | try |
180 | { | 180 | { |
@@ -621,11 +621,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
621 | CalculateTrees.Elapsed += CalculateTrees_Elapsed; | 621 | CalculateTrees.Elapsed += CalculateTrees_Elapsed; |
622 | CalculateTrees.Start(); | 622 | CalculateTrees.Start(); |
623 | } | 623 | } |
624 | else | 624 | else |
625 | { | 625 | { |
626 | CalculateTrees.Stop(); | 626 | CalculateTrees.Stop(); |
627 | } | 627 | } |
628 | } | 628 | } |
629 | 629 | ||
630 | private void growTrees() | 630 | private void growTrees() |
631 | { | 631 | { |
@@ -670,7 +670,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
670 | if (copse.m_trees.Count < copse.m_tree_quantity) | 670 | if (copse.m_trees.Count < copse.m_tree_quantity) |
671 | { | 671 | { |
672 | // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height | 672 | // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height |
673 | if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0) | 673 | if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0) |
674 | { | 674 | { |
675 | if (Util.RandomClass.NextDouble() > 0.75) | 675 | if (Util.RandomClass.NextDouble() > 0.75) |
676 | { | 676 | { |