diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 49 |
3 files changed, 41 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 357c2af..6215526 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -352,9 +352,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
352 | UUID fromAgentID, string fromName, ChatTypeEnum type, | 352 | UUID fromAgentID, string fromName, ChatTypeEnum type, |
353 | string message, ChatSourceType src) | 353 | string message, ChatSourceType src) |
354 | { | 354 | { |
355 | // don't send llRegionSay to child agents. Send normal chat because you | 355 | // don't send chat to child agents |
356 | // can't talk across sim borders if it's not done | 356 | if (presence.IsChildAgent) return false; |
357 | if (type == ChatTypeEnum.Broadcast && presence.IsChildAgent) return false; | ||
358 | 357 | ||
359 | Vector3 fromRegionPos = fromPos + regionPos; | 358 | Vector3 fromRegionPos = fromPos + regionPos; |
360 | Vector3 toRegionPos = presence.AbsolutePosition + | 359 | Vector3 toRegionPos = presence.AbsolutePosition + |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 4284444..5974112 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
200 | * (long)m_scene.RegionInfo.ObjectCapacity | 200 | * (long)m_scene.RegionInfo.ObjectCapacity |
201 | * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus | 201 | * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus |
202 | / 65536L); | 202 | / 65536L); |
203 | m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax); | 203 | //m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax); |
204 | return parcelMax; | 204 | return parcelMax; |
205 | } | 205 | } |
206 | } | 206 | } |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index 286c7f0..6c72324 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -302,6 +302,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
302 | 302 | ||
303 | // split static geometry collision into a grid as before | 303 | // split static geometry collision into a grid as before |
304 | private IntPtr[,] staticPrimspace; | 304 | private IntPtr[,] staticPrimspace; |
305 | private IntPtr[] staticPrimspaceOffRegion; | ||
305 | 306 | ||
306 | public Object OdeLock; | 307 | public Object OdeLock; |
307 | private static Object SimulationLock; | 308 | private static Object SimulationLock; |
@@ -551,6 +552,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
551 | // create all spaces now | 552 | // create all spaces now |
552 | int i, j; | 553 | int i, j; |
553 | IntPtr newspace; | 554 | IntPtr newspace; |
555 | |||
554 | for (i = 0; i < spaceGridMaxX; i++) | 556 | for (i = 0; i < spaceGridMaxX; i++) |
555 | for (j = 0; j < spaceGridMaxY; j++) | 557 | for (j = 0; j < spaceGridMaxY; j++) |
556 | { | 558 | { |
@@ -573,6 +575,29 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
573 | // let this now be real maximum values | 575 | // let this now be real maximum values |
574 | spaceGridMaxX--; | 576 | spaceGridMaxX--; |
575 | spaceGridMaxY--; | 577 | spaceGridMaxY--; |
578 | |||
579 | // create 4 off world spaces (x<0,x>max,y<0,y>max) | ||
580 | staticPrimspaceOffRegion = new IntPtr[4]; | ||
581 | |||
582 | for (i = 0; i < 4; i++) | ||
583 | { | ||
584 | newspace = d.HashSpaceCreate(StaticSpace); | ||
585 | d.GeomSetCategoryBits(newspace, (int)CollisionCategories.Space); | ||
586 | waitForSpaceUnlock(newspace); | ||
587 | d.SpaceSetSublevel(newspace, 2); | ||
588 | d.HashSpaceSetLevels(newspace, -2, 8); | ||
589 | d.GeomSetCategoryBits(newspace, (uint)(CollisionCategories.Space | | ||
590 | CollisionCategories.Geom | | ||
591 | CollisionCategories.Land | | ||
592 | CollisionCategories.Water | | ||
593 | CollisionCategories.Phantom | | ||
594 | CollisionCategories.VolumeDtc | ||
595 | )); | ||
596 | d.GeomSetCollideBits(newspace, 0); | ||
597 | |||
598 | staticPrimspaceOffRegion[i] = newspace; | ||
599 | } | ||
600 | |||
576 | m_lastframe = DateTime.UtcNow; | 601 | m_lastframe = DateTime.UtcNow; |
577 | } | 602 | } |
578 | 603 | ||
@@ -1650,20 +1675,22 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1650 | public IntPtr calculateSpaceForGeom(Vector3 pos) | 1675 | public IntPtr calculateSpaceForGeom(Vector3 pos) |
1651 | { | 1676 | { |
1652 | int x, y; | 1677 | int x, y; |
1653 | x = (int)(pos.X * spacesPerMeter); | ||
1654 | if (x < 0) | ||
1655 | x = 0; | ||
1656 | else if (x > spaceGridMaxX) | ||
1657 | x = spaceGridMaxX; | ||
1658 | 1678 | ||
1679 | if (pos.X < 0) | ||
1680 | return staticPrimspaceOffRegion[0]; | ||
1681 | |||
1682 | if (pos.Y < 0) | ||
1683 | return staticPrimspaceOffRegion[2]; | ||
1684 | |||
1685 | x = (int)(pos.X * spacesPerMeter); | ||
1686 | if (x > spaceGridMaxX) | ||
1687 | return staticPrimspaceOffRegion[1]; | ||
1688 | |||
1659 | y = (int)(pos.Y * spacesPerMeter); | 1689 | y = (int)(pos.Y * spacesPerMeter); |
1660 | if (y < 0) | 1690 | if (y > spaceGridMaxY) |
1661 | y = 0; | 1691 | return staticPrimspaceOffRegion[3]; |
1662 | else if (y >spaceGridMaxY) | ||
1663 | y = spaceGridMaxY; | ||
1664 | 1692 | ||
1665 | IntPtr tmpSpace = staticPrimspace[x, y]; | 1693 | return staticPrimspace[x, y]; |
1666 | return tmpSpace; | ||
1667 | } | 1694 | } |
1668 | 1695 | ||
1669 | #endregion | 1696 | #endregion |