diff options
author | Melanie | 2011-12-24 01:43:44 +0100 |
---|---|---|
committer | Melanie | 2011-12-24 01:43:44 +0100 |
commit | c9dbcfbb3105179167a7f73eff25910538228d0c (patch) | |
tree | c9aba0c9ef03885c314ab0fedb5027b782cd02d3 | |
parent | Add setter for Acceleration on physics objects. (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-c9dbcfbb3105179167a7f73eff25910538228d0c.zip opensim-SC-c9dbcfbb3105179167a7f73eff25910538228d0c.tar.gz opensim-SC-c9dbcfbb3105179167a7f73eff25910538228d0c.tar.bz2 opensim-SC-c9dbcfbb3105179167a7f73eff25910538228d0c.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to '')
4 files changed, 83 insertions, 28 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index e5906f3..9f4b6b7 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1727,6 +1727,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1727 | uint x = 0, y = 0; | 1727 | uint x = 0, y = 0; |
1728 | Utils.LongToUInts(newRegionHandle, out x, out y); | 1728 | Utils.LongToUInts(newRegionHandle, out x, out y); |
1729 | GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); | 1729 | GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); |
1730 | |||
1731 | if (destination == null || !CrossPrimGroupIntoNewRegion(destination, grp, silent)) | ||
1732 | { | ||
1733 | m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID); | ||
1734 | |||
1735 | // We are going to move the object back to the old position so long as the old position | ||
1736 | // is in the region | ||
1737 | oldGroupPosition.X = Util.Clamp<float>(oldGroupPosition.X,1.0f,(float)Constants.RegionSize-1); | ||
1738 | oldGroupPosition.Y = Util.Clamp<float>(oldGroupPosition.Y,1.0f,(float)Constants.RegionSize-1); | ||
1739 | oldGroupPosition.Z = Util.Clamp<float>(oldGroupPosition.Z,1.0f,4096.0f); | ||
1740 | |||
1741 | grp.RootPart.GroupPosition = oldGroupPosition; | ||
1742 | |||
1743 | // Need to turn off the physics flags, otherwise the object will continue to attempt to | ||
1744 | // move out of the region creating an infinite loop of failed attempts to cross | ||
1745 | grp.UpdatePrimFlags(grp.RootPart.LocalId,false,grp.IsTemporary,grp.IsPhantom,false); | ||
1746 | |||
1747 | grp.ScheduleGroupForFullUpdate(); | ||
1748 | } | ||
1749 | |||
1750 | |||
1751 | |||
1752 | |||
1753 | |||
1730 | if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent)) | 1754 | if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent)) |
1731 | { | 1755 | { |
1732 | grp.RootPart.GroupPosition = oldGroupPosition; | 1756 | grp.RootPart.GroupPosition = oldGroupPosition; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 7723eba..48a870e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -273,7 +273,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
273 | /// </remarks> | 273 | /// </remarks> |
274 | public bool UsesPhysics | 274 | public bool UsesPhysics |
275 | { | 275 | { |
276 | get { return (RootPart.Flags & PrimFlags.TemporaryOnRez) != 0; } | 276 | get { return (RootPart.Flags & PrimFlags.Physics) != 0; } |
277 | } | 277 | } |
278 | 278 | ||
279 | /// <summary> | 279 | /// <summary> |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 04ba738..2194ff0 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
110 | private const uint m_regionWidth = Constants.RegionSize; | 110 | private const uint m_regionWidth = Constants.RegionSize; |
111 | private const uint m_regionHeight = Constants.RegionSize; | 111 | private const uint m_regionHeight = Constants.RegionSize; |
112 | 112 | ||
113 | private float ODE_STEPSIZE = 0.020f; | 113 | private float ODE_STEPSIZE = 0.0178f; |
114 | private float metersInSpace = 29.9f; | 114 | private float metersInSpace = 29.9f; |
115 | private float m_timeDilation = 1.0f; | 115 | private float m_timeDilation = 1.0f; |
116 | 116 | ||
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
456 | mAvatarObjectContactFriction = physicsconfig.GetFloat("m_avatarobjectcontact_friction", 75f); | 456 | mAvatarObjectContactFriction = physicsconfig.GetFloat("m_avatarobjectcontact_friction", 75f); |
457 | mAvatarObjectContactBounce = physicsconfig.GetFloat("m_avatarobjectcontact_bounce", 0.1f); | 457 | mAvatarObjectContactBounce = physicsconfig.GetFloat("m_avatarobjectcontact_bounce", 0.1f); |
458 | 458 | ||
459 | ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", 0.020f); | 459 | ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", ODE_STEPSIZE); |
460 | m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); | 460 | m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); |
461 | 461 | ||
462 | avDensity = physicsconfig.GetFloat("av_density", 80f); | 462 | avDensity = physicsconfig.GetFloat("av_density", 80f); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index feea196..0e4d794 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -352,26 +352,54 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
352 | 352 | ||
353 | public List<GridRegion> GetHyperlinks(UUID scopeID) | 353 | public List<GridRegion> GetHyperlinks(UUID scopeID) |
354 | { | 354 | { |
355 | // Hypergrid/linked regions are not supported | 355 | List<GridRegion> foundRegions = new List<GridRegion>(); |
356 | return new List<GridRegion>(); | 356 | |
357 | NameValueCollection requestArgs = new NameValueCollection | ||
358 | { | ||
359 | { "RequestMethod", "GetScenes" }, | ||
360 | { "HyperGrid", "true" }, | ||
361 | { "Enabled", "1" } | ||
362 | }; | ||
363 | |||
364 | OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); | ||
365 | if (response["Success"].AsBoolean()) | ||
366 | { | ||
367 | // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] found regions with name {0}",name); | ||
368 | |||
369 | OSDArray array = response["Scenes"] as OSDArray; | ||
370 | if (array != null) | ||
371 | { | ||
372 | for (int i = 0; i < array.Count; i++) | ||
373 | { | ||
374 | GridRegion region = ResponseToGridRegion(array[i] as OSDMap); | ||
375 | if (region != null) | ||
376 | foundRegions.Add(region); | ||
377 | } | ||
378 | } | ||
379 | } | ||
380 | |||
381 | return foundRegions; | ||
357 | } | 382 | } |
358 | 383 | ||
359 | public int GetRegionFlags(UUID scopeID, UUID regionID) | 384 | public int GetRegionFlags(UUID scopeID, UUID regionID) |
360 | { | 385 | { |
361 | const int REGION_ONLINE = 4; | ||
362 | |||
363 | NameValueCollection requestArgs = new NameValueCollection | 386 | NameValueCollection requestArgs = new NameValueCollection |
364 | { | 387 | { |
365 | { "RequestMethod", "GetScene" }, | 388 | { "RequestMethod", "GetScene" }, |
366 | { "SceneID", regionID.ToString() } | 389 | { "SceneID", regionID.ToString() } |
367 | }; | 390 | }; |
368 | 391 | ||
369 | // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString()); | 392 | m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString()); |
370 | 393 | ||
371 | OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); | 394 | OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); |
372 | if (response["Success"].AsBoolean()) | 395 | if (response["Success"].AsBoolean()) |
373 | { | 396 | { |
374 | return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0; | 397 | OSDMap extraData = response["ExtraData"] as OSDMap; |
398 | int enabled = response["Enabled"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.RegionOnline : 0; | ||
399 | int hypergrid = extraData["HyperGrid"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.Hyperlink : 0; | ||
400 | int flags = enabled | hypergrid; | ||
401 | m_log.DebugFormat("[SGGC] enabled - {0} hg - {1} flags - {2}", enabled, hypergrid, flags); | ||
402 | return flags; | ||
375 | } | 403 | } |
376 | else | 404 | else |
377 | { | 405 | { |
@@ -499,24 +527,27 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
499 | Vector3d minPosition = response["MinPosition"].AsVector3d(); | 527 | Vector3d minPosition = response["MinPosition"].AsVector3d(); |
500 | region.RegionLocX = (int)minPosition.X; | 528 | region.RegionLocX = (int)minPosition.X; |
501 | region.RegionLocY = (int)minPosition.Y; | 529 | region.RegionLocY = (int)minPosition.Y; |
502 | 530 | ||
503 | Uri httpAddress = response["Address"].AsUri(); | 531 | if ( ! extraData["HyperGrid"] ) { |
504 | region.ExternalHostName = httpAddress.Host; | 532 | Uri httpAddress = response["Address"].AsUri(); |
505 | region.HttpPort = (uint)httpAddress.Port; | 533 | region.ExternalHostName = httpAddress.Host; |
506 | 534 | region.HttpPort = (uint)httpAddress.Port; | |
507 | region.ServerURI = extraData["ServerURI"].AsString(); | 535 | |
508 | 536 | IPAddress internalAddress; | |
509 | IPAddress internalAddress; | 537 | IPAddress.TryParse(extraData["InternalAddress"].AsString(), out internalAddress); |
510 | IPAddress.TryParse(extraData["InternalAddress"].AsString(), out internalAddress); | 538 | if (internalAddress == null) |
511 | if (internalAddress == null) | 539 | internalAddress = IPAddress.Any; |
512 | internalAddress = IPAddress.Any; | 540 | |
513 | 541 | region.InternalEndPoint = new IPEndPoint(internalAddress, extraData["InternalPort"].AsInteger()); | |
514 | region.InternalEndPoint = new IPEndPoint(internalAddress, extraData["InternalPort"].AsInteger()); | 542 | region.TerrainImage = extraData["MapTexture"].AsUUID(); |
515 | region.TerrainImage = extraData["MapTexture"].AsUUID(); | 543 | region.Access = (byte)extraData["Access"].AsInteger(); |
516 | region.Access = (byte)extraData["Access"].AsInteger(); | 544 | region.RegionSecret = extraData["RegionSecret"].AsString(); |
517 | region.RegionSecret = extraData["RegionSecret"].AsString(); | 545 | region.EstateOwner = extraData["EstateOwner"].AsUUID(); |
518 | region.EstateOwner = extraData["EstateOwner"].AsUUID(); | 546 | region.Token = extraData["Token"].AsString(); |
519 | region.Token = extraData["Token"].AsString(); | 547 | region.ServerURI = extraData["ServerURI"].AsString(); |
548 | } else { | ||
549 | region.ServerURI = response["Address"]; | ||
550 | } | ||
520 | 551 | ||
521 | return region; | 552 | return region; |
522 | } | 553 | } |