Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2012-11-04 16:00:41 +01:00
commit 4737839b3a
1 changed files with 19 additions and 13 deletions

View File

@ -121,34 +121,40 @@ namespace OpenSim.Region.OptionalModules
private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene)
{ {
if ((newPoint.X > 257f || newPoint.X < -1f || newPoint.Y > 257f || newPoint.Y < -1f)) if (newPoint.X < -1f || newPoint.X > (float)(Constants.RegionSize + 1) ||
newPoint.Y < -1f || newPoint.Y > (float)(Constants.RegionSize + 1))
return true; return true;
SceneObjectPart obj = scene.GetSceneObjectPart(objectID); SceneObjectPart obj = scene.GetSceneObjectPart(objectID);
Vector3 oldPoint = obj.GroupPosition;
int objectCount = obj.ParentGroup.PrimCount; if (obj == null)
ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); return false;
// Prim counts are determined by the location of the root prim. if we're
// moving a child prim, just let it pass
if (!obj.IsRoot)
{
return true;
}
ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y);
if (newParcel == null) if (newParcel == null)
return true; return true;
int usedPrims = newParcel.PrimCounts.Total; Vector3 oldPoint = obj.GroupPosition;
int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
// The prim hasn't crossed a region boundry so we don't need to worry // The prim hasn't crossed a region boundry so we don't need to worry
// about prim counts here // about prim counts here
if(oldParcel.Equals(newParcel)) if(oldParcel != null && oldParcel.Equals(newParcel))
{ {
return true; return true;
} }
// Prim counts are determined by the location of the root prim. if we're int objectCount = obj.ParentGroup.PrimCount;
// moving a child prim, just let it pass int usedPrims = newParcel.PrimCounts.Total;
if(!obj.IsRoot) int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount();
{
return true;
}
// TODO: Add Special Case here for temporary prims // TODO: Add Special Case here for temporary prims