diff options
author | Melanie Thielker | 2016-07-04 03:37:45 +0100 |
---|---|---|
committer | Melanie Thielker | 2016-07-04 03:37:45 +0100 |
commit | 4468aa0dcfebb045bc54df1f67f021f85f9bc4b6 (patch) | |
tree | f52b7cf28acfe4bdbdff7ed7dfd112c6dd6b16fb /OpenSim/Region/Framework | |
parent | Finally remove the requirement for an InventoryItem/FolderBase object to (diff) | |
parent | New config var: DisableObjectTransfer. If set to True, objects never cross; i... (diff) | |
download | opensim-SC_OLD-4468aa0dcfebb045bc54df1f67f021f85f9bc4b6.zip opensim-SC_OLD-4468aa0dcfebb045bc54df1f67f021f85f9bc4b6.tar.gz opensim-SC_OLD-4468aa0dcfebb045bc54df1f67f021f85f9bc4b6.tar.bz2 opensim-SC_OLD-4468aa0dcfebb045bc54df1f67f021f85f9bc4b6.tar.xz |
Merge branch 'master' of opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IEventQueue.cs | 1 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 20 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 |
4 files changed, 34 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index f4014db..4361310 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs | |||
@@ -58,7 +58,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
58 | void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat, | 58 | void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat, |
59 | bool isModerator, bool textMute); | 59 | bool isModerator, bool textMute); |
60 | void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); | 60 | void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); |
61 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); | ||
62 | void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data); | 61 | void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data); |
63 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); | 62 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); |
64 | OSD BuildEvent(string eventName, OSD eventBody); | 63 | OSD BuildEvent(string eventName, OSD eventBody); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a75b460..0d19e94 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -250,6 +250,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
250 | /// | 250 | /// |
251 | public int m_linksetPhysCapacity = 0; | 251 | public int m_linksetPhysCapacity = 0; |
252 | 252 | ||
253 | /// <summary> | ||
254 | /// When placed outside the region's border, do we transfer the objects or | ||
255 | /// do we keep simulating them here? | ||
256 | /// </summary> | ||
257 | public bool DisableObjectTransfer { get; set; } | ||
258 | |||
253 | public bool m_useFlySlow; | 259 | public bool m_useFlySlow; |
254 | public bool m_useTrashOnDelete = true; | 260 | public bool m_useTrashOnDelete = true; |
255 | 261 | ||
@@ -1155,6 +1161,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1155 | if (entityTransferConfig != null) | 1161 | if (entityTransferConfig != null) |
1156 | { | 1162 | { |
1157 | AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing); | 1163 | AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing); |
1164 | DisableObjectTransfer = entityTransferConfig.GetBoolean("DisableObjectTransfer", false); | ||
1158 | } | 1165 | } |
1159 | 1166 | ||
1160 | #region Interest Management | 1167 | #region Interest Management |
@@ -4309,14 +4316,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
4309 | if (banned || restricted) | 4316 | if (banned || restricted) |
4310 | { | 4317 | { |
4311 | ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY); | 4318 | ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY); |
4319 | Vector2? newPosition = null; | ||
4312 | if (nearestParcel != null) | 4320 | if (nearestParcel != null) |
4313 | { | 4321 | { |
4314 | //Move agent to nearest allowed | 4322 | //Move agent to nearest allowed |
4315 | Vector2 newPosition = GetParcelSafeCorner(nearestParcel); | 4323 | // Vector2 newPosition = GetParcelSafeCorner(nearestParcel); |
4316 | posX = newPosition.X; | 4324 | newPosition = nearestParcel.GetNearestPoint(new Vector3(posX, posY,0)); |
4317 | posY = newPosition.Y; | ||
4318 | } | 4325 | } |
4319 | else | 4326 | if(newPosition == null) |
4320 | { | 4327 | { |
4321 | if (banned) | 4328 | if (banned) |
4322 | { | 4329 | { |
@@ -4329,6 +4336,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
4329 | } | 4336 | } |
4330 | return false; | 4337 | return false; |
4331 | } | 4338 | } |
4339 | else | ||
4340 | { | ||
4341 | posX = newPosition.Value.X; | ||
4342 | posY = newPosition.Value.Y; | ||
4343 | } | ||
4332 | } | 4344 | } |
4333 | reason = ""; | 4345 | reason = ""; |
4334 | return true; | 4346 | return true; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f9f795f..90ee1d1 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -242,6 +242,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
242 | coarseLocations = new List<Vector3>(); | 242 | coarseLocations = new List<Vector3>(); |
243 | avatarUUIDs = new List<UUID>(); | 243 | avatarUUIDs = new List<UUID>(); |
244 | 244 | ||
245 | // coarse locations are sent as BYTE, so limited to the 255m max of normal regions | ||
246 | // try to work around that scale down X and Y acording to region size, so reducing the resolution | ||
247 | // | ||
248 | // viewers need to scale up | ||
249 | float scaleX = m_parentScene.RegionInfo.RegionSizeX / Constants.RegionSize; | ||
250 | if (scaleX == 0) | ||
251 | scaleX = 1.0f; | ||
252 | scaleX = 1.0f / scaleX; | ||
253 | float scaleY = m_parentScene.RegionInfo.RegionSizeY / Constants.RegionSize; | ||
254 | if (scaleY == 0) | ||
255 | scaleY = 1.0f; | ||
256 | scaleY = 1.0f / scaleY; | ||
257 | |||
245 | List<ScenePresence> presences = GetScenePresences(); | 258 | List<ScenePresence> presences = GetScenePresences(); |
246 | for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) | 259 | for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) |
247 | { | 260 | { |
@@ -250,9 +263,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
250 | // If this presence is a child agent, we don't want its coarse locations | 263 | // If this presence is a child agent, we don't want its coarse locations |
251 | if (sp.IsChildAgent) | 264 | if (sp.IsChildAgent) |
252 | continue; | 265 | continue; |
266 | Vector3 pos = sp.AbsolutePosition; | ||
267 | pos.X *= scaleX; | ||
268 | pos.Y *= scaleY; | ||
253 | 269 | ||
254 | coarseLocations.Add(sp.AbsolutePosition); | 270 | coarseLocations.Add(pos); |
255 | |||
256 | avatarUUIDs.Add(sp.UUID); | 271 | avatarUUIDs.Add(sp.UUID); |
257 | } | 272 | } |
258 | } | 273 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e226196..cb1bf55 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -556,6 +556,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
556 | && !Scene.PositionIsInCurrentRegion(val) | 556 | && !Scene.PositionIsInCurrentRegion(val) |
557 | && !IsAttachmentCheckFull() | 557 | && !IsAttachmentCheckFull() |
558 | && !Scene.LoadingPrims | 558 | && !Scene.LoadingPrims |
559 | && !Scene.DisableObjectTransfer | ||
559 | ) | 560 | ) |
560 | { | 561 | { |
561 | if (!inTransit) | 562 | if (!inTransit) |