diff options
author | Robert Adams | 2013-11-02 15:36:16 -0700 |
---|---|---|
committer | Robert Adams | 2013-11-02 15:36:16 -0700 |
commit | f66737fe563c9cb46b10ca55382f989016f00e38 (patch) | |
tree | 5643e947cc4c613ede9a3e8272351ec339ca5e5e | |
parent | varregion: fix lawn-mower terrain fill so it works for non-square regions. (diff) | |
download | opensim-SC-f66737fe563c9cb46b10ca55382f989016f00e38.zip opensim-SC-f66737fe563c9cb46b10ca55382f989016f00e38.tar.gz opensim-SC-f66737fe563c9cb46b10ca55382f989016f00e38.tar.bz2 opensim-SC-f66737fe563c9cb46b10ca55382f989016f00e38.tar.xz |
varregion: Enforce the configuration of square regions in RegionInfo.cs.
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index fa26100..cf909cd 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -767,7 +767,7 @@ namespace OpenSim.Framework | |||
767 | RegionSizeX -= partial; | 767 | RegionSizeX -= partial; |
768 | if (RegionSizeX == 0) | 768 | if (RegionSizeX == 0) |
769 | RegionSizeX = Constants.RegionSize; | 769 | RegionSizeX = Constants.RegionSize; |
770 | m_log.WarnFormat("{0} Region size must be multiple of {1}. Enforcing {2}.RegionSizeX={3} instead of specified {4}", | 770 | m_log.ErrorFormat("{0} Region size must be multiple of {1}. Enforcing {2}.RegionSizeX={3} instead of specified {4}", |
771 | LogHeader, Constants.RegionSize, m_regionName, RegionSizeX, RegionSizeX + partial); | 771 | LogHeader, Constants.RegionSize, m_regionName, RegionSizeX, RegionSizeX + partial); |
772 | } | 772 | } |
773 | partial = RegionSizeY % Constants.RegionSize; | 773 | partial = RegionSizeY % Constants.RegionSize; |
@@ -776,10 +776,22 @@ namespace OpenSim.Framework | |||
776 | RegionSizeY -= partial; | 776 | RegionSizeY -= partial; |
777 | if (RegionSizeY == 0) | 777 | if (RegionSizeY == 0) |
778 | RegionSizeY = Constants.RegionSize; | 778 | RegionSizeY = Constants.RegionSize; |
779 | m_log.WarnFormat("{0} Region size must be multiple of {1}. Enforcing {2}.RegionSizeY={3} instead of specified {4}", | 779 | m_log.ErrorFormat("{0} Region size must be multiple of {1}. Enforcing {2}.RegionSizeY={3} instead of specified {4}", |
780 | LogHeader, Constants.RegionSize, m_regionName, RegionSizeY, RegionSizeY + partial); | 780 | LogHeader, Constants.RegionSize, m_regionName, RegionSizeY, RegionSizeY + partial); |
781 | } | 781 | } |
782 | m_log.InfoFormat("{0} Region {1} size set to x={2}, y={3}", LogHeader, m_regionName, RegionSizeX, RegionSizeY); | 782 | |
783 | // Because of things in the viewer, regions MUST be square. | ||
784 | // Remove this check when viewers have been updated. | ||
785 | if (RegionSizeX != RegionSizeY) | ||
786 | { | ||
787 | uint minSize = Math.Min(RegionSizeX, RegionSizeY); | ||
788 | RegionSizeX = minSize; | ||
789 | RegionSizeY = minSize; | ||
790 | m_log.ErrorFormat("{0} Regions must be square until viewers are updated. Forcing region {1} size to <{2},{3}>", | ||
791 | LogHeader, m_regionName, RegionSizeX, RegionSizeY); | ||
792 | } | ||
793 | |||
794 | m_log.InfoFormat("{0} Region {1} size set to <{2},{3}>", LogHeader, m_regionName, RegionSizeX, RegionSizeY); | ||
783 | } | 795 | } |
784 | } | 796 | } |
785 | 797 | ||