diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-28 14:45:17 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-28 14:45:17 -0400 |
commit | ac718843d92df3b512c4b9194bc05940ab064faf (patch) | |
tree | e594a16d6a0e8006d353a50d4910f81a628928b3 /OpenSim/Region/CoreModules/World | |
parent | Merge branch 'master' of ssh://MyConnection/var/git/opensim (diff) | |
download | opensim-SC_OLD-ac718843d92df3b512c4b9194bc05940ab064faf.zip opensim-SC_OLD-ac718843d92df3b512c4b9194bc05940ab064faf.tar.gz opensim-SC_OLD-ac718843d92df3b512c4b9194bc05940ab064faf.tar.bz2 opensim-SC_OLD-ac718843d92df3b512c4b9194bc05940ab064faf.tar.xz |
* Allow corner prim crossings. Previously this was only on a single cardinal direction
* Some leg work in getting avatar teleports into 'virtual regions' moved to the proper region.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs | 67 |
1 files changed, 56 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs b/OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs index 3a4a17b..22ef107 100644 --- a/OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs +++ b/OpenSim/Region/CoreModules/World/Land/PhysicsCombiner.cs | |||
@@ -216,9 +216,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
216 | //xxy | 216 | //xxy |
217 | //xxx | 217 | //xxx |
218 | if ((((int)conn.X * (int)Constants.RegionSize) + conn.XEnd | 218 | if ((((int)conn.X * (int)Constants.RegionSize) + conn.XEnd |
219 | == (regionConnections.X * (int)Constants.RegionSize)) | 219 | >= (regionConnections.X * (int)Constants.RegionSize)) |
220 | && (((int)conn.Y * (int)Constants.RegionSize) | 220 | && (((int)conn.Y * (int)Constants.RegionSize) |
221 | == (regionConnections.Y * (int)Constants.RegionSize))) | 221 | >= (regionConnections.Y * (int)Constants.RegionSize))) |
222 | { | 222 | { |
223 | Vector3 offset = Vector3.Zero; | 223 | Vector3 offset = Vector3.Zero; |
224 | offset.X = (((regionConnections.X * (int)Constants.RegionSize)) - | 224 | offset.X = (((regionConnections.X * (int)Constants.RegionSize)) - |
@@ -262,9 +262,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
262 | //xxx | 262 | //xxx |
263 | //xxx | 263 | //xxx |
264 | if ((((int)conn.X * (int)Constants.RegionSize) | 264 | if ((((int)conn.X * (int)Constants.RegionSize) |
265 | == (regionConnections.X * (int)Constants.RegionSize)) | 265 | >= (regionConnections.X * (int)Constants.RegionSize)) |
266 | && (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd | 266 | && (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd |
267 | == (regionConnections.Y * (int)Constants.RegionSize))) | 267 | >= (regionConnections.Y * (int)Constants.RegionSize))) |
268 | { | 268 | { |
269 | Vector3 offset = Vector3.Zero; | 269 | Vector3 offset = Vector3.Zero; |
270 | offset.X = (((regionConnections.X * (int)Constants.RegionSize)) - | 270 | offset.X = (((regionConnections.X * (int)Constants.RegionSize)) - |
@@ -303,9 +303,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
303 | //xxx | 303 | //xxx |
304 | //xxx | 304 | //xxx |
305 | if ((((int)conn.X * (int)Constants.RegionSize) + conn.YEnd | 305 | if ((((int)conn.X * (int)Constants.RegionSize) + conn.YEnd |
306 | == (regionConnections.X * (int)Constants.RegionSize)) | 306 | >= (regionConnections.X * (int)Constants.RegionSize)) |
307 | && (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd | 307 | && (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd |
308 | == (regionConnections.Y * (int)Constants.RegionSize))) | 308 | >= (regionConnections.Y * (int)Constants.RegionSize))) |
309 | { | 309 | { |
310 | Vector3 offset = Vector3.Zero; | 310 | Vector3 offset = Vector3.Zero; |
311 | offset.X = (((regionConnections.X * (int)Constants.RegionSize)) - | 311 | offset.X = (((regionConnections.X * (int)Constants.RegionSize)) - |
@@ -315,13 +315,58 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
315 | 315 | ||
316 | Vector3 extents = Vector3.Zero; | 316 | Vector3 extents = Vector3.Zero; |
317 | extents.Y = regionConnections.YEnd + conn.YEnd; | 317 | extents.Y = regionConnections.YEnd + conn.YEnd; |
318 | extents.X = conn.XEnd + conn.XEnd; | 318 | extents.X = regionConnections.XEnd + conn.XEnd; |
319 | conn.UpdateExtents(extents); | ||
320 | |||
321 | m_log.DebugFormat("Scene: {0} to the NorthEast of Scene{1} Offset: {2}. Extents:{3}", | ||
322 | conn.RegionScene.RegionInfo.RegionName, | ||
323 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | ||
324 | |||
325 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); | ||
326 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); | ||
327 | |||
328 | if (conn.RegionScene.NorthBorders.Count == 1)// && 2) | ||
329 | { | ||
330 | //compound border | ||
331 | conn.RegionScene.NorthBorders[0].BorderLine.Z += (int)Constants.RegionSize; | ||
332 | conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize; | ||
333 | conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize; | ||
334 | |||
335 | |||
336 | |||
337 | } | ||
338 | |||
339 | scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south | ||
340 | |||
341 | if (conn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2) | ||
342 | { | ||
343 | |||
344 | conn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize; | ||
345 | conn.RegionScene.NorthBorders[0].BorderLine.Y += (int)Constants.RegionSize; | ||
346 | conn.RegionScene.SouthBorders[0].BorderLine.Y += (int)Constants.RegionSize; | ||
347 | |||
348 | |||
349 | } | ||
350 | scene.WestBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport West | ||
351 | /* | ||
352 | else | ||
353 | { | ||
354 | conn.RegionScene.NorthBorders[0].BorderLine.Z += (int)Constants.RegionSize; | ||
355 | conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize; | ||
356 | conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize; | ||
357 | scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south | ||
358 | } | ||
359 | */ | ||
360 | |||
319 | 361 | ||
320 | m_log.DebugFormat("Scene: {0} to the south of Scene{1} Offset: {2}. Extents:{3}", | 362 | // Reset Terrain.. since terrain normally loads first. |
321 | conn.RegionScene.RegionInfo.RegionName, | 363 | //conn.RegionScene.PhysicsScene.SetTerrain(conn.RegionScene.Heightmap.GetFloatsSerialised()); |
322 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | 364 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); |
365 | //conn.RegionScene.PhysicsScene.SetTerrain(conn.RegionScene.Heightmap.GetFloatsSerialised()); | ||
366 | |||
367 | connectedYN = true; | ||
323 | 368 | ||
324 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset,extents); | 369 | //scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset,extents); |
325 | 370 | ||
326 | break; | 371 | break; |
327 | } | 372 | } |