diff options
author | Robert Adams | 2014-02-15 16:01:43 -0800 |
---|---|---|
committer | Robert Adams | 2014-02-15 16:01:43 -0800 |
commit | 877bdcdce1533d8dc3e13c0def7b015080ee881e (patch) | |
tree | 38dba2a95f035eea5b64aeba9bf59385de63faee /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Non-functional changes of numbers into symbolic references and a few (diff) | |
download | opensim-SC_OLD-877bdcdce1533d8dc3e13c0def7b015080ee881e.zip opensim-SC_OLD-877bdcdce1533d8dc3e13c0def7b015080ee881e.tar.gz opensim-SC_OLD-877bdcdce1533d8dc3e13c0def7b015080ee881e.tar.bz2 opensim-SC_OLD-877bdcdce1533d8dc3e13c0def7b015080ee881e.tar.xz |
Rewrite of mega-region code to use new form of border checking.
This commit eliminates all of the 'border' class and list code and replaces
it with testing if in the current region.
Impacts: can make a mega-region out of varregions of the same size; and
mega-region combinations must be rectangular (not square but rectangular)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c6b98ca..0657cbb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -429,7 +429,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
429 | /// <returns></returns> | 429 | /// <returns></returns> |
430 | public bool IsAttachmentCheckFull() | 430 | public bool IsAttachmentCheckFull() |
431 | { | 431 | { |
432 | return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); | 432 | return (IsAttachment || (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0)); |
433 | } | 433 | } |
434 | 434 | ||
435 | private struct avtocrossInfo | 435 | private struct avtocrossInfo |
@@ -451,19 +451,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
451 | if (Scene != null) | 451 | if (Scene != null) |
452 | { | 452 | { |
453 | if ( | 453 | if ( |
454 | // (Scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) | 454 | !Scene.PositionIsInCurrentRegion(val) |
455 | // || Scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) | 455 | && !IsAttachmentCheckFull() |
456 | // || Scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) | 456 | && (!Scene.LoadingPrims) |
457 | // || Scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) | 457 | ) |
458 | // Experimental change for better border crossings. | ||
459 | // The commented out original lines above would, it seems, trigger | ||
460 | // a border crossing a little early or late depending on which | ||
461 | // direction the object was moving. | ||
462 | (Scene.TestBorderCross(val, Cardinals.E) | ||
463 | || Scene.TestBorderCross(val, Cardinals.W) | ||
464 | || Scene.TestBorderCross(val, Cardinals.N) | ||
465 | || Scene.TestBorderCross(val, Cardinals.S)) | ||
466 | && !IsAttachmentCheckFull() && (!Scene.LoadingPrims)) | ||
467 | { | 458 | { |
468 | IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 459 | IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
469 | string version = String.Empty; | 460 | string version = String.Empty; |