aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-04-02 00:58:33 +0100
committerJustin Clark-Casey (justincc)2014-04-02 00:58:33 +0100
commit0af8886400e56cfbc2efc0d6a8ab01eb289b4e52 (patch)
treeedd6ccc86d800964d27f7a034e8381f5cb03abd9 /OpenSim/Region/OptionalModules
parentMerge branch 'master' of /home/opensim/src/opensim (diff)
downloadopensim-SC_OLD-0af8886400e56cfbc2efc0d6a8ab01eb289b4e52.zip
opensim-SC_OLD-0af8886400e56cfbc2efc0d6a8ab01eb289b4e52.tar.gz
opensim-SC_OLD-0af8886400e56cfbc2efc0d6a8ab01eb289b4e52.tar.bz2
opensim-SC_OLD-0af8886400e56cfbc2efc0d6a8ab01eb289b4e52.tar.xz
Fix problem where moving an object to another region on the same simulator was failing, with the object returning to its original position.
Root cause was that PrimLimitsModule was not properly handling the case where the parcel it was asked to check was outside the current region's bounds. If this is the case, we can abort the check since the receiving region will perform it. Added a regression test for this case.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index 8b4d231..18cec6c 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -58,8 +58,6 @@ namespace OpenSim.Region.OptionalModules
58 58
59 public void Initialise(IConfigSource config) 59 public void Initialise(IConfigSource config)
60 { 60 {
61 //IConfig myConfig = config.Configs["Startup"];
62
63 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules", 61 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
64 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); 62 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
65 63
@@ -129,6 +127,11 @@ namespace OpenSim.Region.OptionalModules
129 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); 127 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
130 ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); 128 ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y);
131 129
130 // newParcel will be null only if it outside of our current region. If this is the case, then the
131 // receiving permissions will perform the check.
132 if (newParcel == null)
133 return true;
134
132 int usedPrims = newParcel.PrimCounts.Total; 135 int usedPrims = newParcel.PrimCounts.Total;
133 int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); 136 int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount();
134 137