diff options
author | UbitUmarov | 2015-11-22 03:56:48 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-22 03:56:48 +0000 |
commit | 71f5c2b856aeab2b535094804f15317d5dc544e1 (patch) | |
tree | 11df1331a46e4b809205a78e56e1e6c864509431 /OpenSim/Region/CoreModules | |
parent | don't use 'funny' Quaternions (diff) | |
download | opensim-SC-71f5c2b856aeab2b535094804f15317d5dc544e1.zip opensim-SC-71f5c2b856aeab2b535094804f15317d5dc544e1.tar.gz opensim-SC-71f5c2b856aeab2b535094804f15317d5dc544e1.tar.bz2 opensim-SC-71f5c2b856aeab2b535094804f15317d5dc544e1.tar.xz |
minor changes
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 623671f..63dd4b2 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -127,10 +127,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
127 | /// </value> | 127 | /// </value> |
128 | protected float m_rotation = 0f; | 128 | protected float m_rotation = 0f; |
129 | 129 | ||
130 | /// <value> | ||
131 | /// original oar region size. not using Constants.RegionSize | ||
132 | /// </value> | ||
133 | protected Vector3 m_incomingRegionSize = new Vector3(256f, 256f, float.MaxValue); | ||
134 | |||
130 | /// <value> | 135 | /// <value> |
131 | /// Center around which to apply the rotation relative to the origional oar position | 136 | /// Center around which to apply the rotation relative to the original oar position |
132 | /// </value> | 137 | /// </value> |
133 | protected Vector3 m_rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0f); | 138 | protected Vector3 m_rotationCenter = new Vector3(128f, 128f, 0f); |
134 | 139 | ||
135 | /// <value> | 140 | /// <value> |
136 | /// Corner 1 of a bounding cuboid which specifies which objects we load from the oar | 141 | /// Corner 1 of a bounding cuboid which specifies which objects we load from the oar |
@@ -140,14 +145,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
140 | /// <value> | 145 | /// <value> |
141 | /// Size of a bounding cuboid which specifies which objects we load from the oar | 146 | /// Size of a bounding cuboid which specifies which objects we load from the oar |
142 | /// </value> | 147 | /// </value> |
143 | protected Vector3 m_boundingSize = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize); | 148 | protected Vector3 m_boundingSize = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, float.MaxValue); |
144 | 149 | ||
145 | protected bool m_noObjects = false; | 150 | protected bool m_noObjects = false; |
146 | protected bool m_boundingBox = false; | 151 | protected bool m_boundingBox = false; |
147 | protected bool m_debug = false; | 152 | protected bool m_debug = false; |
148 | 153 | ||
149 | protected Vector3 m_incomingRegionSize = new Vector3(256f, 256f, 4096f); | ||
150 | |||
151 | /// <summary> | 154 | /// <summary> |
152 | /// Used to cache lookups for valid uuids. | 155 | /// Used to cache lookups for valid uuids. |
153 | /// </summary> | 156 | /// </summary> |
@@ -218,8 +221,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
218 | : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); | 221 | : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); |
219 | 222 | ||
220 | m_boundingOrigin = Vector3.Zero; | 223 | m_boundingOrigin = Vector3.Zero; |
221 | m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, Constants.RegionHeight); | 224 | m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue); |
222 | 225 | ||
223 | if (options.ContainsKey("bounding-origin")) | 226 | if (options.ContainsKey("bounding-origin")) |
224 | { | 227 | { |
225 | Vector3 boOption = (Vector3)options["bounding-origin"]; | 228 | Vector3 boOption = (Vector3)options["bounding-origin"]; |
@@ -567,18 +570,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
567 | SceneObjectGroup sceneObject = serialiser.DeserializeGroupFromXml2(serialisedSceneObject); | 570 | SceneObjectGroup sceneObject = serialiser.DeserializeGroupFromXml2(serialisedSceneObject); |
568 | 571 | ||
569 | Vector3 pos = sceneObject.AbsolutePosition; | 572 | Vector3 pos = sceneObject.AbsolutePosition; |
573 | if (m_debug) | ||
574 | m_log.DebugFormat("[ARCHIVER]: Loading object from OAR with original scene position {0}.", pos.ToString()); | ||
570 | 575 | ||
571 | //fix the rotation center to the middle of the incoming region now as it's otherwise hopelessly confusing on varRegions | ||
572 | //as it only works with objects and terrain (using old Merge method) and not parcels | ||
573 | m_rotationCenter.X = m_incomingRegionSize.X / 2; | ||
574 | m_rotationCenter.Y = m_incomingRegionSize.Y / 2; | ||
575 | |||
576 | if (m_debug) m_log.DebugFormat("[ARCHIVER]: Loading object from OAR with original scene position {0}.", pos.ToString()); | ||
577 | // Happily this does not do much to the object since it hasn't been added to the scene yet | 576 | // Happily this does not do much to the object since it hasn't been added to the scene yet |
578 | if (!sceneObject.IsAttachment) | 577 | if (!sceneObject.IsAttachment) |
579 | { | 578 | { |
580 | if (m_rotation != 0f) | 579 | if (m_rotation != 0f) |
581 | { | 580 | { |
581 | //fix the rotation center to the middle of the incoming region now as it's otherwise hopelessly confusing on varRegions | ||
582 | //as it only works with objects and terrain (using old Merge method) and not parcels | ||
583 | m_rotationCenter.X = m_incomingRegionSize.X / 2; | ||
584 | m_rotationCenter.Y = m_incomingRegionSize.Y / 2; | ||
585 | |||
582 | // Rotate the object | 586 | // Rotate the object |
583 | sceneObject.RootPart.RotationOffset = rot * sceneObject.GroupRotation; | 587 | sceneObject.RootPart.RotationOffset = rot * sceneObject.GroupRotation; |
584 | // Get object position relative to rotation axis | 588 | // Get object position relative to rotation axis |
@@ -609,7 +613,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
609 | } | 613 | } |
610 | sceneObject.AbsolutePosition = pos; | 614 | sceneObject.AbsolutePosition = pos; |
611 | } | 615 | } |
612 | if (m_debug) m_log.DebugFormat("[ARCHIVER]: Placing object from OAR in scene at position {0}. ", pos.ToString()); | 616 | if (m_debug) |
617 | m_log.DebugFormat("[ARCHIVER]: Placing object from OAR in scene at position {0}. ", pos.ToString()); | ||
613 | 618 | ||
614 | bool isTelehub = (sceneObject.UUID == oldTelehubUUID) && (oldTelehubUUID != UUID.Zero); | 619 | bool isTelehub = (sceneObject.UUID == oldTelehubUUID) && (oldTelehubUUID != UUID.Zero); |
615 | 620 | ||