aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authormingchen2007-12-19 04:28:54 +0000
committermingchen2007-12-19 04:28:54 +0000
commitbd16dddce5a23e67d9ead896f770a50168e46ef4 (patch)
tree8dfa26923eb1c34d8620b72a0f2de8b1d88718cd
parentThanks to CharlieO for: (diff)
downloadopensim-SC-bd16dddce5a23e67d9ead896f770a50168e46ef4.zip
opensim-SC-bd16dddce5a23e67d9ead896f770a50168e46ef4.tar.gz
opensim-SC-bd16dddce5a23e67d9ead896f770a50168e46ef4.tar.bz2
opensim-SC-bd16dddce5a23e67d9ead896f770a50168e46ef4.tar.xz
*Added Ban Lines around parcels for banned avatars, but there is no actual blocking done yet.
*Made the OnSignificantClientMovement distance from .02 to .45 to make it easier on the server.
-rw-r--r--OpenSim/Framework/LandData.cs2
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs12
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs18
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs2
4 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index e35aa0e..1a94cfd 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Framework
53 public int simwideArea = 0; 53 public int simwideArea = 0;
54 public int salePrice = 0; //Unemeplemented. Parcels price. 54 public int salePrice = 0; //Unemeplemented. Parcels price.
55 public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; 55 public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
56 56
57 public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | 57 public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark |
58 (uint) Parcel.ParcelFlags.AllowAllObjectEntry | 58 (uint) Parcel.ParcelFlags.AllowAllObjectEntry |
59 (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | 59 (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform |
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs
index 3f60b1b..4cfb0c1 100644
--- a/OpenSim/Region/Environment/LandManagement/Land.cs
+++ b/OpenSim/Region/Environment/LandManagement/Land.cs
@@ -227,6 +227,18 @@ namespace OpenSim.Region.Environment.LandManagement
227 } 227 }
228 } 228 }
229 229
230 public bool isBannedFromLand(ParcelManager.ParcelAccessEntry entry, IClientAPI remote_client)
231 {
232 if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseBanList) > 0)
233 {
234 if (this.landData.parcelAccessList.Contains(entry))
235 {
236 //They are banned, so lets send them a notice about this parcel
237 return true;
238 }
239 }
240 return false;
241 }
230 public void sendLandUpdateToClient(IClientAPI remote_client) 242 public void sendLandUpdateToClient(IClientAPI remote_client)
231 { 243 {
232 sendLandProperties(0, false, 0, remote_client); 244 sendLandProperties(0, false, 0, remote_client);
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index f3ab502..59bf7f8 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -590,6 +590,22 @@ namespace OpenSim.Region.Environment.LandManagement
590 addLandObject(fullSimParcel); 590 addLandObject(fullSimParcel);
591 } 591 }
592 592
593 public void sendOutBannedNotices(IClientAPI avatar)
594 {
595 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
596 entry.AgentID = avatar.AgentId;
597 entry.Flags = ParcelManager.AccessList.Ban;
598 entry.Time = new DateTime();
599
600 foreach (Land checkBan in landList.Values)
601 {
602 if (checkBan.isBannedFromLand(entry, avatar))
603 {
604 checkBan.sendLandProperties(-30000, false, (int)ParcelManager.ParcelResult.Single, avatar);
605 }
606 }
607 }
608
593 public void sendLandUpdate(ScenePresence avatar) 609 public void sendLandUpdate(ScenePresence avatar)
594 { 610 {
595 Land over = getLandObject((int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), 611 Land over = getLandObject((int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
@@ -599,6 +615,7 @@ namespace OpenSim.Region.Environment.LandManagement
599 { 615 {
600 over.sendLandUpdateToClient(avatar.ControllingClient); 616 over.sendLandUpdateToClient(avatar.ControllingClient);
601 } 617 }
618
602 } 619 }
603 620
604 public void handleSignificantClientMovement(IClientAPI remote_client) 621 public void handleSignificantClientMovement(IClientAPI remote_client)
@@ -608,6 +625,7 @@ namespace OpenSim.Region.Environment.LandManagement
608 if (clientAvatar != null) 625 if (clientAvatar != null)
609 { 626 {
610 sendLandUpdate(clientAvatar); 627 sendLandUpdate(clientAvatar);
628 sendOutBannedNotices(remote_client);
611 } 629 }
612 } 630 }
613 631
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 86ff65e..91b6463 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Environment.Scenes
1181 /// </summary> 1181 /// </summary>
1182 protected void CheckForSignificantMovement() 1182 protected void CheckForSignificantMovement()
1183 { 1183 {
1184 if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.02) 1184 if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
1185 { 1185 {
1186 posLastSignificantMove = AbsolutePosition; 1186 posLastSignificantMove = AbsolutePosition;
1187 if (OnSignificantClientMovement != null) 1187 if (OnSignificantClientMovement != null)