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.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-04-02 00:58:33 +01:00
parent 4cbd45f3d5
commit 0af8886400
4 changed files with 207 additions and 6 deletions

View File

@@ -58,8 +58,6 @@ namespace OpenSim.Region.OptionalModules
public void Initialise(IConfigSource config)
{
//IConfig myConfig = config.Configs["Startup"];
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
@@ -129,6 +127,11 @@ namespace OpenSim.Region.OptionalModules
ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y);
// newParcel will be null only if it outside of our current region. If this is the case, then the
// receiving permissions will perform the check.
if (newParcel == null)
return true;
int usedPrims = newParcel.PrimCounts.Total;
int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount();