diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 1279ac1..5750aa4 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -191,9 +191,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
191 | forcedPosition = null; | 191 | forcedPosition = null; |
192 | } | 192 | } |
193 | //if we are far away, teleport | 193 | //if we are far away, teleport |
194 | else if (Vector3.Distance(clientAvatar.AbsolutePosition,forcedPosition.Value) > 3) | 194 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) |
195 | { | 195 | { |
196 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}",forcedPosition.Value,clientAvatar.AbsolutePosition)); | 196 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
197 | clientAvatar.Teleport(forcedPosition.Value); | 197 | clientAvatar.Teleport(forcedPosition.Value); |
198 | forcedPosition = null; | 198 | forcedPosition = null; |
199 | } | 199 | } |
@@ -374,30 +374,27 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
374 | } | 374 | } |
375 | } | 375 | } |
376 | 376 | ||
377 | public void SendOutNearestBanLine(IClientAPI avatar) | 377 | public void SendOutNearestBanLine(IClientAPI client) |
378 | { | 378 | { |
379 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 379 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); |
380 | foreach (ScenePresence presence in avatars) | 380 | if (sp == null || sp.IsChildAgent) |
381 | return; | ||
382 | |||
383 | List<ILandObject> checkLandParcels = ParcelsNearPoint(sp.AbsolutePosition); | ||
384 | foreach (ILandObject checkBan in checkLandParcels) | ||
381 | { | 385 | { |
382 | if (presence.UUID == avatar.AgentId) | 386 | if (checkBan.IsBannedFromLand(client.AgentId)) |
383 | { | 387 | { |
384 | List<ILandObject> checkLandParcels = ParcelsNearPoint(presence.AbsolutePosition); | 388 | checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, client); |
385 | foreach (ILandObject checkBan in checkLandParcels) | 389 | return; //Only send one |
386 | { | 390 | } |
387 | if (checkBan.IsBannedFromLand(avatar.AgentId)) | 391 | if (checkBan.IsRestrictedFromLand(client.AgentId)) |
388 | { | 392 | { |
389 | checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionBanned, false, (int)ParcelResult.Single, avatar); | 393 | checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, client); |
390 | return; //Only send one | 394 | return; //Only send one |
391 | } | ||
392 | if (checkBan.IsRestrictedFromLand(avatar.AgentId)) | ||
393 | { | ||
394 | checkBan.SendLandProperties((int)ParcelPropertiesStatus.CollisionNotOnAccessList, false, (int)ParcelResult.Single, avatar); | ||
395 | return; //Only send one | ||
396 | } | ||
397 | } | ||
398 | return; | ||
399 | } | 395 | } |
400 | } | 396 | } |
397 | return; | ||
401 | } | 398 | } |
402 | 399 | ||
403 | public void SendLandUpdate(ScenePresence avatar, bool force) | 400 | public void SendLandUpdate(ScenePresence avatar, bool force) |