diff options
author | SignpostMarv | 2012-08-06 15:35:40 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-15 23:35:23 +0100 |
commit | ef4122213c440c55d32c097c08e52170f4b4346a (patch) | |
tree | ba7aa3047bac89053992d2539907f07d110f415e /OpenSim/Framework/RegionInfo.cs | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.zip opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.tar.gz opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.tar.bz2 opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.tar.xz |
enables configurable minimum sizes for physical & non-physical prims
Diffstat (limited to 'OpenSim/Framework/RegionInfo.cs')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 2080a16..8131089 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -120,7 +120,9 @@ namespace OpenSim.Framework | |||
120 | public UUID lastMapUUID = UUID.Zero; | 120 | public UUID lastMapUUID = UUID.Zero; |
121 | public string lastMapRefresh = "0"; | 121 | public string lastMapRefresh = "0"; |
122 | 122 | ||
123 | private float m_nonphysPrimMin = 0; | ||
123 | private int m_nonphysPrimMax = 0; | 124 | private int m_nonphysPrimMax = 0; |
125 | private float m_physPrimMin = 0; | ||
124 | private int m_physPrimMax = 0; | 126 | private int m_physPrimMax = 0; |
125 | private bool m_clampPrimSize = false; | 127 | private bool m_clampPrimSize = false; |
126 | private int m_objectCapacity = 0; | 128 | private int m_objectCapacity = 0; |
@@ -285,11 +287,21 @@ namespace OpenSim.Framework | |||
285 | set { m_windlight = value; } | 287 | set { m_windlight = value; } |
286 | } | 288 | } |
287 | 289 | ||
290 | public float NonphysPrimMin | ||
291 | { | ||
292 | get { return m_nonphysPrimMin; } | ||
293 | } | ||
294 | |||
288 | public int NonphysPrimMax | 295 | public int NonphysPrimMax |
289 | { | 296 | { |
290 | get { return m_nonphysPrimMax; } | 297 | get { return m_nonphysPrimMax; } |
291 | } | 298 | } |
292 | 299 | ||
300 | public float PhysPrimMin | ||
301 | { | ||
302 | get { return m_physPrimMin; } | ||
303 | } | ||
304 | |||
293 | public int PhysPrimMax | 305 | public int PhysPrimMax |
294 | { | 306 | { |
295 | get { return m_physPrimMax; } | 307 | get { return m_physPrimMax; } |
@@ -623,16 +635,28 @@ namespace OpenSim.Framework | |||
623 | m_regionType = config.GetString("RegionType", String.Empty); | 635 | m_regionType = config.GetString("RegionType", String.Empty); |
624 | allKeys.Remove("RegionType"); | 636 | allKeys.Remove("RegionType"); |
625 | 637 | ||
626 | // Prim stuff | 638 | #region Prim stuff |
627 | // | 639 | |
640 | m_nonphysPrimMin = config.GetFloat("NonphysicalPrimMin", 0); | ||
641 | allKeys.Remove("NonphysicalPrimMin"); | ||
642 | |||
628 | m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 0); | 643 | m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 0); |
629 | allKeys.Remove("NonphysicalPrimMax"); | 644 | allKeys.Remove("NonphysicalPrimMax"); |
645 | |||
646 | m_physPrimMin = config.GetFloat("PhysicalPrimMin", 0); | ||
647 | allKeys.Remove("PhysicalPrimMin"); | ||
648 | |||
630 | m_physPrimMax = config.GetInt("PhysicalPrimMax", 0); | 649 | m_physPrimMax = config.GetInt("PhysicalPrimMax", 0); |
631 | allKeys.Remove("PhysicalPrimMax"); | 650 | allKeys.Remove("PhysicalPrimMax"); |
651 | |||
632 | m_clampPrimSize = config.GetBoolean("ClampPrimSize", false); | 652 | m_clampPrimSize = config.GetBoolean("ClampPrimSize", false); |
633 | allKeys.Remove("ClampPrimSize"); | 653 | allKeys.Remove("ClampPrimSize"); |
654 | |||
634 | m_objectCapacity = config.GetInt("MaxPrims", 15000); | 655 | m_objectCapacity = config.GetInt("MaxPrims", 15000); |
635 | allKeys.Remove("MaxPrims"); | 656 | allKeys.Remove("MaxPrims"); |
657 | |||
658 | #endregion | ||
659 | |||
636 | m_agentCapacity = config.GetInt("MaxAgents", 100); | 660 | m_agentCapacity = config.GetInt("MaxAgents", 100); |
637 | allKeys.Remove("MaxAgents"); | 661 | allKeys.Remove("MaxAgents"); |
638 | 662 | ||
@@ -668,10 +692,18 @@ namespace OpenSim.Framework | |||
668 | 692 | ||
669 | config.Set("ExternalHostName", m_externalHostName); | 693 | config.Set("ExternalHostName", m_externalHostName); |
670 | 694 | ||
695 | if (m_nonphysPrimMin != 0) | ||
696 | config.Set("NonphysicalPrimMax", m_nonphysPrimMin); | ||
697 | |||
671 | if (m_nonphysPrimMax != 0) | 698 | if (m_nonphysPrimMax != 0) |
672 | config.Set("NonphysicalPrimMax", m_nonphysPrimMax); | 699 | config.Set("NonphysicalPrimMax", m_nonphysPrimMax); |
700 | |||
701 | if (m_physPrimMin != 0) | ||
702 | config.Set("PhysicalPrimMax", m_physPrimMin); | ||
703 | |||
673 | if (m_physPrimMax != 0) | 704 | if (m_physPrimMax != 0) |
674 | config.Set("PhysicalPrimMax", m_physPrimMax); | 705 | config.Set("PhysicalPrimMax", m_physPrimMax); |
706 | |||
675 | config.Set("ClampPrimSize", m_clampPrimSize.ToString()); | 707 | config.Set("ClampPrimSize", m_clampPrimSize.ToString()); |
676 | 708 | ||
677 | if (m_objectCapacity != 0) | 709 | if (m_objectCapacity != 0) |
@@ -754,9 +786,15 @@ namespace OpenSim.Framework | |||
754 | configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 786 | configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
755 | "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); | 787 | "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); |
756 | 788 | ||
789 | configMember.addConfigurationOption("nonphysical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, | ||
790 | "Minimum size for nonphysical prims", m_nonphysPrimMin.ToString(), true); | ||
791 | |||
757 | configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 792 | configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
758 | "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); | 793 | "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); |
759 | 794 | ||
795 | configMember.addConfigurationOption("physical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, | ||
796 | "Minimum size for nonphysical prims", m_physPrimMin.ToString(), true); | ||
797 | |||
760 | configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 798 | configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
761 | "Maximum size for physical prims", m_physPrimMax.ToString(), true); | 799 | "Maximum size for physical prims", m_physPrimMax.ToString(), true); |
762 | 800 | ||