aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-29 23:39:27 -0400
committerTeravus Ovares (Dan Olivares)2009-08-29 23:39:27 -0400
commit33f36c9010254b14fe1b9fc1dd6bdd52ae1b16c9 (patch)
treeee67cd60c8c2cb1f760294e83ae57f9cbac7a4af /OpenSim
parent* Fix the reason why physical vehicles have a problem in virtual regions. (diff)
downloadopensim-SC_OLD-33f36c9010254b14fe1b9fc1dd6bdd52ae1b16c9.zip
opensim-SC_OLD-33f36c9010254b14fe1b9fc1dd6bdd52ae1b16c9.tar.gz
opensim-SC_OLD-33f36c9010254b14fe1b9fc1dd6bdd52ae1b16c9.tar.bz2
opensim-SC_OLD-33f36c9010254b14fe1b9fc1dd6bdd52ae1b16c9.tar.xz
* Rename the RegionCombiner Module from PhysicsCombiner
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml2
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs (renamed from OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs)9
-rw-r--r--OpenSim/Region/Framework/Scenes/Border.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs50
4 files changed, 37 insertions, 28 deletions
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index e38c755..8831791 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -10,7 +10,7 @@
10 <Extension path = "/OpenSim/RegionModules"> 10 <Extension path = "/OpenSim/RegionModules">
11 <RegionModule id="CapabilitiesModule" type="OpenSim.Region.CoreModules.Agent.Capabilities.CapabilitiesModule" /> 11 <RegionModule id="CapabilitiesModule" type="OpenSim.Region.CoreModules.Agent.Capabilities.CapabilitiesModule" />
12 <RegionModule id="TerrainModule" type="OpenSim.Region.CoreModules.World.Terrain.TerrainModule" /> 12 <RegionModule id="TerrainModule" type="OpenSim.Region.CoreModules.World.Terrain.TerrainModule" />
13 <RegionModule id="PhysicsCombiner" type="OpenSim.Region.CoreModules.World.Land.PhysicsCombiner" /> 13 <RegionModule id="RegionCombinerModule" type="OpenSim.Region.CoreModules.World.Land.RegionCombinerModule" />
14 <RegionModule id="WorldMapModule" type="OpenSim.Region.CoreModules.World.WorldMap.WorldMapModule" /> 14 <RegionModule id="WorldMapModule" type="OpenSim.Region.CoreModules.World.WorldMap.WorldMapModule" />
15 <RegionModule id="HGWorldMapModule" type="OpenSim.Region.CoreModules.Hypergrid.HGWorldMapModule" /> 15 <RegionModule id="HGWorldMapModule" type="OpenSim.Region.CoreModules.Hypergrid.HGWorldMapModule" />
16 <RegionModule id="UrlModule" type="OpenSim.Region.CoreModules.Scripting.LSLHttp.UrlModule" /> 16 <RegionModule id="UrlModule" type="OpenSim.Region.CoreModules.Scripting.LSLHttp.UrlModule" />
diff --git a/OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index 8921085..5ba6f39 100644
--- a/OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -10,11 +10,11 @@ using OpenSim.Region.Framework.Scenes;
10 10
11namespace OpenSim.Region.CoreModules.World.Land 11namespace OpenSim.Region.CoreModules.World.Land
12{ 12{
13 public class PhysicsCombiner : ISharedRegionModule 13 public class RegionCombinerModule : ISharedRegionModule
14 { 14 {
15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
16 16
17 public string Name { get { return "PhysicsCombiner";} } 17 public string Name { get { return "RegionCombinerModule"; } }
18 public Type ReplaceableInterface 18 public Type ReplaceableInterface
19 { 19 {
20 get { return null; } 20 get { return null; }
@@ -23,10 +23,11 @@ namespace OpenSim.Region.CoreModules.World.Land
23 public Type ReplacableInterface { get { return null; } } 23 public Type ReplacableInterface { get { return null; } }
24 24
25 private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>(); 25 private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>();
26 private bool enabledYN = true; 26 private bool enabledYN = false;
27 public void Initialise(IConfigSource source) 27 public void Initialise(IConfigSource source)
28 { 28 {
29 29 IConfig myConfig = source.Configs["Startup"];
30 enabledYN = myConfig.GetBoolean("CombineContiguiousRegions", false);
30 } 31 }
31 32
32 public void Close() 33 public void Close()
diff --git a/OpenSim/Region/Framework/Scenes/Border.cs b/OpenSim/Region/Framework/Scenes/Border.cs
index 9a08afe..8f02a9c 100644
--- a/OpenSim/Region/Framework/Scenes/Border.cs
+++ b/OpenSim/Region/Framework/Scenes/Border.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Framework.Scenes
103 case Cardinals.SE: // x+1, y-1 103 case Cardinals.SE: // x+1, y-1
104 break; 104 break;
105 case Cardinals.S: // x+0, y-1 105 case Cardinals.S: // x+0, y-1
106 if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y < BorderLine.Z) 106 if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y-1 < BorderLine.Z)
107 { 107 {
108 return true; 108 return true;
109 } 109 }
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Framework.Scenes
111 case Cardinals.SW: // x-1, y-1 111 case Cardinals.SW: // x-1, y-1
112 break; 112 break;
113 case Cardinals.W: // x-1, y+0 113 case Cardinals.W: // x-1, y+0
114 if (position.Y >= BorderLine.X && position.Y <= BorderLine.Y && position.X < BorderLine.Z) 114 if (position.Y >= BorderLine.X && position.Y <= BorderLine.Y && position.X-1 < BorderLine.Z)
115 { 115 {
116 return true; 116 return true;
117 } 117 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 167d5f7..1673a22 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -1180,55 +1180,63 @@ namespace OpenSim.Region.Framework.Scenes
1180 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z); 1180 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
1181 uint neighbourx = m_regionInfo.RegionLocX; 1181 uint neighbourx = m_regionInfo.RegionLocX;
1182 uint neighboury = m_regionInfo.RegionLocY; 1182 uint neighboury = m_regionInfo.RegionLocY;
1183 const float boundaryDistance = 1.7f;
1184 Vector3 northCross = new Vector3(0, boundaryDistance, 0);
1185 Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
1186 Vector3 eastCross = new Vector3(boundaryDistance, 0, 0);
1187 Vector3 westCross = new Vector3(-1 * boundaryDistance, 0, 0);
1183 1188
1184 // distance to edge that will trigger crossing 1189 // distance to edge that will trigger crossing
1185 const float boundaryDistance = 1.7f; 1190
1186 1191
1187 // distance into new region to place avatar 1192 // distance into new region to place avatar
1188 const float enterDistance = 0.1f; 1193 const float enterDistance = 0.5f;
1189 1194
1190 if (scene.TestBorderCross(pos, Cardinals.W)) 1195 if (scene.TestBorderCross(pos + westCross, Cardinals.W))
1191 { 1196 {
1192 if (scene.TestBorderCross(pos, Cardinals.N)) 1197 if (scene.TestBorderCross(pos + northCross, Cardinals.N))
1193 { 1198 {
1194 Border b = scene.GetCrossedBorder(pos, Cardinals.N); 1199 Border b = scene.GetCrossedBorder(pos + northCross, Cardinals.N);
1195 neighboury += (uint)(int)(b.BorderLine.Z/(int)Constants.RegionSize); 1200 neighboury += (uint)(int)(b.BorderLine.Z/(int)Constants.RegionSize);
1196 } 1201 }
1197 1202 else if (scene.TestBorderCross(pos + southCross, Cardinals.S))
1198 1203 {
1204 neighboury--;
1205 newpos.Y = Constants.RegionSize - enterDistance;
1206 }
1207
1199 neighbourx--; 1208 neighbourx--;
1200 newpos.X = Constants.RegionSize - enterDistance; 1209 newpos.X = Constants.RegionSize - enterDistance;
1201 1210
1202 } 1211 }
1203 else if (scene.TestBorderCross(pos, Cardinals.E)) 1212 else if (scene.TestBorderCross(pos + eastCross, Cardinals.E))
1204 { 1213 {
1205 if (scene.TestBorderCross(pos, Cardinals.S)) 1214 Border b = scene.GetCrossedBorder(pos + eastCross, Cardinals.E);
1215 neighbourx += (uint)(int)(b.BorderLine.Z / (int)Constants.RegionSize);
1216 newpos.X = enterDistance;
1217
1218 if (scene.TestBorderCross(pos + southCross, Cardinals.S))
1206 { 1219 {
1207 neighboury--; 1220 neighboury--;
1208 newpos.Y = Constants.RegionSize - enterDistance; 1221 newpos.Y = Constants.RegionSize - enterDistance;
1209 } 1222 }
1210 else if (scene.TestBorderCross(pos, Cardinals.N)) 1223 else if (scene.TestBorderCross(pos + northCross, Cardinals.N))
1211 { 1224 {
1212 Border b = scene.GetCrossedBorder(pos, Cardinals.N); 1225 Border c = scene.GetCrossedBorder(pos + northCross, Cardinals.N);
1213 neighboury += (uint)(int)(b.BorderLine.Z / (int)Constants.RegionSize); 1226 neighboury += (uint)(int)(c.BorderLine.Z / (int)Constants.RegionSize);
1214 newpos.Y = enterDistance; 1227 newpos.Y = enterDistance;
1215 } 1228 }
1216 else 1229
1217 {
1218 Border b = scene.GetCrossedBorder(pos, Cardinals.E);
1219 neighboury += (uint)(int)(b.BorderLine.Z / (int)Constants.RegionSize);
1220 newpos.X = enterDistance;
1221 }
1222 1230
1223 } 1231 }
1224 else if (scene.TestBorderCross(pos, Cardinals.S)) 1232 else if (scene.TestBorderCross(pos + southCross, Cardinals.S))
1225 { 1233 {
1226 neighboury--; 1234 neighboury--;
1227 newpos.Y = Constants.RegionSize - enterDistance; 1235 newpos.Y = Constants.RegionSize - enterDistance;
1228 } 1236 }
1229 else if (scene.TestBorderCross(pos, Cardinals.N)) 1237 else if (scene.TestBorderCross(pos + northCross, Cardinals.N))
1230 { 1238 {
1231 Border b = scene.GetCrossedBorder(pos, Cardinals.N); 1239 Border b = scene.GetCrossedBorder(pos + northCross, Cardinals.N);
1232 neighboury += (uint)(int)(b.BorderLine.Z / (int)Constants.RegionSize); 1240 neighboury += (uint)(int)(b.BorderLine.Z / (int)Constants.RegionSize);
1233 newpos.Y = enterDistance; 1241 newpos.Y = enterDistance;
1234 } 1242 }