aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs51
-rw-r--r--OpenSim/Region/Framework/Scenes/Border.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Cardinals.cs29
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/BorderTests.cs29
-rw-r--r--OpenSim/Region/Physics/Meshing/Mesh.cs4
6 files changed, 99 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index c525227..0ede5c1 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Reflection; 30using System.Reflection;
4using log4net; 31using log4net;
@@ -343,13 +370,13 @@ namespace OpenSim.Region.CoreModules.World.Land
343 conn.RegionScene.PhysicsScene.Combine(null,Vector3.Zero,extents); 370 conn.RegionScene.PhysicsScene.Combine(null,Vector3.Zero,extents);
344 scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); 371 scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero);
345 372
346 lock(conn.RegionScene.NorthBorders) 373 lock (conn.RegionScene.NorthBorders)
347 conn.RegionScene.NorthBorders[0].BorderLine.Z += (int)Constants.RegionSize; 374 conn.RegionScene.NorthBorders[0].BorderLine.Z += (int)Constants.RegionSize;
348 lock(conn.RegionScene.EastBorders) 375 lock (conn.RegionScene.EastBorders)
349 conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize; 376 conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize;
350 lock(conn.RegionScene.WestBorders) 377 lock (conn.RegionScene.WestBorders)
351 conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize; 378 conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize;
352 lock(scene.SouthBorders) 379 lock (scene.SouthBorders)
353 scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south 380 scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south
354 381
355 // Reset Terrain.. since terrain normally loads first. 382 // Reset Terrain.. since terrain normally loads first.
@@ -400,32 +427,32 @@ namespace OpenSim.Region.CoreModules.World.Land
400 427
401 conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); 428 conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents);
402 scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); 429 scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero);
403 lock(conn.RegionScene.NorthBorders) 430 lock (conn.RegionScene.NorthBorders)
404 if (conn.RegionScene.NorthBorders.Count == 1)// && 2) 431 if (conn.RegionScene.NorthBorders.Count == 1)// && 2)
405 { 432 {
406 //compound border 433 //compound border
407 // already locked above 434 // already locked above
408 conn.RegionScene.NorthBorders[0].BorderLine.Z += (int)Constants.RegionSize; 435 conn.RegionScene.NorthBorders[0].BorderLine.Z += (int)Constants.RegionSize;
409 436
410 lock(conn.RegionScene.EastBorders) 437 lock (conn.RegionScene.EastBorders)
411 conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize; 438 conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize;
412 lock(conn.RegionScene.WestBorders) 439 lock (conn.RegionScene.WestBorders)
413 conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize; 440 conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize;
414 441
415 442
416 443
417 } 444 }
418 lock(scene.SouthBorders) 445 lock (scene.SouthBorders)
419 scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south 446 scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south
420 447
421 lock(conn.RegionScene.EastBorders) 448 lock (conn.RegionScene.EastBorders)
422 if (conn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2) 449 if (conn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2)
423 { 450 {
424 451
425 conn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize; 452 conn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize;
426 lock(conn.RegionScene.NorthBorders) 453 lock (conn.RegionScene.NorthBorders)
427 conn.RegionScene.NorthBorders[0].BorderLine.Y += (int)Constants.RegionSize; 454 conn.RegionScene.NorthBorders[0].BorderLine.Y += (int)Constants.RegionSize;
428 lock(conn.RegionScene.SouthBorders) 455 lock (conn.RegionScene.SouthBorders)
429 conn.RegionScene.SouthBorders[0].BorderLine.Y += (int)Constants.RegionSize; 456 conn.RegionScene.SouthBorders[0].BorderLine.Y += (int)Constants.RegionSize;
430 457
431 458
diff --git a/OpenSim/Region/Framework/Scenes/Border.cs b/OpenSim/Region/Framework/Scenes/Border.cs
index 9a08afe..1488c5b 100644
--- a/OpenSim/Region/Framework/Scenes/Border.cs
+++ b/OpenSim/Region/Framework/Scenes/Border.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes
87 switch (CrossDirection) 87 switch (CrossDirection)
88 { 88 {
89 case Cardinals.N: // x+0, y+1 89 case Cardinals.N: // x+0, y+1
90 if (position.X >= BorderLine.X && position.X <=BorderLine.Y && position.Y > BorderLine.Z ) 90 if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y > BorderLine.Z)
91 { 91 {
92 return true; 92 return true;
93 } 93 }
@@ -118,8 +118,6 @@ namespace OpenSim.Region.Framework.Scenes
118 break; 118 break;
119 case Cardinals.NW: // x-1, y+1 119 case Cardinals.NW: // x-1, y+1
120 break; 120 break;
121
122
123 } 121 }
124 122
125 return result; 123 return result;
@@ -143,8 +141,5 @@ namespace OpenSim.Region.Framework.Scenes
143 return 0; 141 return 0;
144 } 142 }
145 } 143 }
146
147 } 144 }
148
149
150} 145}
diff --git a/OpenSim/Region/Framework/Scenes/Cardinals.cs b/OpenSim/Region/Framework/Scenes/Cardinals.cs
index 692389a..3a06827 100644
--- a/OpenSim/Region/Framework/Scenes/Cardinals.cs
+++ b/OpenSim/Region/Framework/Scenes/Cardinals.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4 31
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d1d82d6..1d0da4c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -499,7 +499,7 @@ namespace OpenSim.Region.Framework.Scenes
499 SouthBorders.Add(southBorder); 499 SouthBorders.Add(southBorder);
500 500
501 Border eastBorder = new Border(); 501 Border eastBorder = new Border();
502 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize ); //<--- 502 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
503 eastBorder.CrossDirection = Cardinals.E; 503 eastBorder.CrossDirection = Cardinals.E;
504 EastBorders.Add(eastBorder); 504 EastBorders.Add(eastBorder);
505 505
diff --git a/OpenSim/Region/Framework/Scenes/Tests/BorderTests.cs b/OpenSim/Region/Framework/Scenes/Tests/BorderTests.cs
index 272c96e..e140cd5 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/BorderTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/BorderTests.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using OpenMetaverse; 31using OpenMetaverse;
diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/Physics/Meshing/Mesh.cs
index b19cf70..ceafaad 100644
--- a/OpenSim/Region/Physics/Meshing/Mesh.cs
+++ b/OpenSim/Region/Physics/Meshing/Mesh.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Physics.Meshing
65 { 65 {
66 // If a vertex of the triangle is not yet in the vertices list, 66 // If a vertex of the triangle is not yet in the vertices list,
67 // add it and set its index to the current index count 67 // add it and set its index to the current index count
68 if( !vertices.ContainsKey(triangle.v1) ) 68 if (!vertices.ContainsKey(triangle.v1))
69 vertices[triangle.v1] = vertices.Count; 69 vertices[triangle.v1] = vertices.Count;
70 if (!vertices.ContainsKey(triangle.v2)) 70 if (!vertices.ContainsKey(triangle.v2))
71 vertices[triangle.v2] = vertices.Count; 71 vertices[triangle.v2] = vertices.Count;
@@ -154,7 +154,7 @@ namespace OpenSim.Region.Physics.Meshing
154 { 154 {
155 //m_log.WarnFormat("vertices.Count = {0}", vertices.Count); 155 //m_log.WarnFormat("vertices.Count = {0}", vertices.Count);
156 result = new float[vertices.Count * 3]; 156 result = new float[vertices.Count * 3];
157 foreach(KeyValuePair<Vertex, int> kvp in vertices) 157 foreach (KeyValuePair<Vertex, int> kvp in vertices)
158 { 158 {
159 Vertex v = kvp.Key; 159 Vertex v = kvp.Key;
160 int i = kvp.Value; 160 int i = kvp.Value;