*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.afrisby
parent
16174dac6e
commit
bd16dddce5
|
@ -227,6 +227,18 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool isBannedFromLand(ParcelManager.ParcelAccessEntry entry, IClientAPI remote_client)
|
||||||
|
{
|
||||||
|
if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseBanList) > 0)
|
||||||
|
{
|
||||||
|
if (this.landData.parcelAccessList.Contains(entry))
|
||||||
|
{
|
||||||
|
//They are banned, so lets send them a notice about this parcel
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
public void sendLandUpdateToClient(IClientAPI remote_client)
|
public void sendLandUpdateToClient(IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
sendLandProperties(0, false, 0, remote_client);
|
sendLandProperties(0, false, 0, remote_client);
|
||||||
|
|
|
@ -590,6 +590,22 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
addLandObject(fullSimParcel);
|
addLandObject(fullSimParcel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sendOutBannedNotices(IClientAPI avatar)
|
||||||
|
{
|
||||||
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
|
entry.AgentID = avatar.AgentId;
|
||||||
|
entry.Flags = ParcelManager.AccessList.Ban;
|
||||||
|
entry.Time = new DateTime();
|
||||||
|
|
||||||
|
foreach (Land checkBan in landList.Values)
|
||||||
|
{
|
||||||
|
if (checkBan.isBannedFromLand(entry, avatar))
|
||||||
|
{
|
||||||
|
checkBan.sendLandProperties(-30000, false, (int)ParcelManager.ParcelResult.Single, avatar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void sendLandUpdate(ScenePresence avatar)
|
public void sendLandUpdate(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
Land over = getLandObject((int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
|
Land over = getLandObject((int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
|
||||||
|
@ -599,6 +615,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
{
|
{
|
||||||
over.sendLandUpdateToClient(avatar.ControllingClient);
|
over.sendLandUpdateToClient(avatar.ControllingClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleSignificantClientMovement(IClientAPI remote_client)
|
public void handleSignificantClientMovement(IClientAPI remote_client)
|
||||||
|
@ -608,6 +625,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
if (clientAvatar != null)
|
if (clientAvatar != null)
|
||||||
{
|
{
|
||||||
sendLandUpdate(clientAvatar);
|
sendLandUpdate(clientAvatar);
|
||||||
|
sendOutBannedNotices(remote_client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void CheckForSignificantMovement()
|
protected void CheckForSignificantMovement()
|
||||||
{
|
{
|
||||||
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.02)
|
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
|
||||||
{
|
{
|
||||||
posLastSignificantMove = AbsolutePosition;
|
posLastSignificantMove = AbsolutePosition;
|
||||||
if (OnSignificantClientMovement != null)
|
if (OnSignificantClientMovement != null)
|
||||||
|
|
Loading…
Reference in New Issue