diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a2e4417..44c476c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -331,7 +331,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
331 | { | 331 | { |
332 | get | 332 | get |
333 | { | 333 | { |
334 | Vector3 minScale = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionSize); | 334 | Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize); |
335 | Vector3 maxScale = Vector3.Zero; | 335 | Vector3 maxScale = Vector3.Zero; |
336 | Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f); | 336 | Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f); |
337 | 337 | ||
@@ -463,8 +463,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
463 | && !IsAttachmentCheckFull() && (!Scene.LoadingPrims)) | 463 | && !IsAttachmentCheckFull() && (!Scene.LoadingPrims)) |
464 | { | 464 | { |
465 | IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 465 | IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
466 | uint x = 0; | ||
467 | uint y = 0; | ||
468 | string version = String.Empty; | 466 | string version = String.Empty; |
469 | Vector3 newpos = Vector3.Zero; | 467 | Vector3 newpos = Vector3.Zero; |
470 | OpenSim.Services.Interfaces.GridRegion destination = null; | 468 | OpenSim.Services.Interfaces.GridRegion destination = null; |
@@ -484,7 +482,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
484 | 482 | ||
485 | // We set the avatar position as being the object | 483 | // We set the avatar position as being the object |
486 | // position to get the region to send to | 484 | // position to get the region to send to |
487 | if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out x, out y, out version, out newpos)) == null) | 485 | if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out version, out newpos)) == null) |
488 | { | 486 | { |
489 | canCross = false; | 487 | canCross = false; |
490 | break; | 488 | break; |
@@ -519,14 +517,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
519 | m_scene.CrossPrimGroupIntoNewRegion(val, this, true); | 517 | m_scene.CrossPrimGroupIntoNewRegion(val, this, true); |
520 | 518 | ||
521 | // Normalize | 519 | // Normalize |
522 | if (val.X >= Constants.RegionSize) | 520 | if (val.X >= m_scene.RegionInfo.RegionSizeX) |
523 | val.X -= Constants.RegionSize; | 521 | val.X -= m_scene.RegionInfo.RegionSizeX; |
524 | if (val.Y >= Constants.RegionSize) | 522 | if (val.Y >= m_scene.RegionInfo.RegionSizeY) |
525 | val.Y -= Constants.RegionSize; | 523 | val.Y -= m_scene.RegionInfo.RegionSizeY; |
526 | if (val.X < 0) | 524 | if (val.X < 0) |
527 | val.X += Constants.RegionSize; | 525 | val.X += m_scene.RegionInfo.RegionSizeX; |
528 | if (val.Y < 0) | 526 | if (val.Y < 0) |
529 | val.Y += Constants.RegionSize; | 527 | val.Y += m_scene.RegionInfo.RegionSizeY; |
530 | 528 | ||
531 | // If it's deleted, crossing was successful | 529 | // If it's deleted, crossing was successful |
532 | if (IsDeleted) | 530 | if (IsDeleted) |
@@ -574,9 +572,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
574 | } | 572 | } |
575 | } | 573 | } |
576 | Vector3 oldp = AbsolutePosition; | 574 | Vector3 oldp = AbsolutePosition; |
577 | val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)Constants.RegionSize - 0.5f); | 575 | val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)m_scene.RegionInfo.RegionSizeX - 0.5f); |
578 | val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)Constants.RegionSize - 0.5f); | 576 | val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)m_scene.RegionInfo.RegionSizeY - 0.5f); |
579 | val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f); | 577 | val.Z = Util.Clamp<float>(oldp.Z, 0.5f, Constants.RegionHeight); |
580 | } | 578 | } |
581 | } | 579 | } |
582 | 580 | ||
@@ -993,9 +991,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
993 | maxX = -256f; | 991 | maxX = -256f; |
994 | maxY = -256f; | 992 | maxY = -256f; |
995 | maxZ = -256f; | 993 | maxZ = -256f; |
996 | minX = 256f; | 994 | minX = 10000f; |
997 | minY = 256f; | 995 | minY = 10000f; |
998 | minZ = 8192f; | 996 | minZ = 10000f; |
999 | 997 | ||
1000 | SceneObjectPart[] parts = m_parts.GetArray(); | 998 | SceneObjectPart[] parts = m_parts.GetArray(); |
1001 | for (int i = 0; i < parts.Length; i++) | 999 | for (int i = 0; i < parts.Length; i++) |