send parcels onwership change updates to all avatars that may want it
parent
29f59fe407
commit
b4eb5d6cca
|
@ -1529,18 +1529,17 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
if (avatar.IsChildAgent)
|
||||
{
|
||||
if(client == remote_client)
|
||||
land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client);
|
||||
land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client);
|
||||
return;
|
||||
}
|
||||
|
||||
ILandObject aland = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||
if (aland != null)
|
||||
{
|
||||
if(client == remote_client && land != aland)
|
||||
if(land != aland)
|
||||
land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client);
|
||||
else if (land == aland)
|
||||
aland.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, client);
|
||||
aland.SendLandProperties(0, true, LandChannel.LAND_RESULT_SINGLE, client);
|
||||
}
|
||||
if (avatar.currentParcelUUID == parcelID)
|
||||
avatar.currentParcelUUID = parcelID; // force parcel flags review
|
||||
|
@ -1614,9 +1613,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
land.LandData.GroupID = UUID.Zero;
|
||||
land.LandData.IsGroupOwned = false;
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(true, remote_client);
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1638,9 +1637,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
land.LandData.IsGroupOwned = false;
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
||||
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(true, remote_client);
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToAvatars();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1667,9 +1666,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
land.LandData.AnyAVSounds = true;
|
||||
land.LandData.GroupAVSounds = true;
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(true, remote_client);
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToAvatars();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1692,6 +1691,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
if (land != null)
|
||||
{
|
||||
land.UpdateLandSold(e.agentId, e.groupId, e.groupOwned, (uint)e.transactionID, e.parcelPrice, e.parcelArea);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToAvatars();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1744,6 +1745,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
if (!m_scene.Permissions.CanDeedParcel(remote_client.AgentId, land))
|
||||
return;
|
||||
land.DeedToGroup(groupID);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToAvatars();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2297,10 +2300,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
land.LandData.GroupID = UUID.Zero;
|
||||
|
||||
land.LandData.Name = DefaultGodParcelName;
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
//m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToClient(true, client);
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
}
|
||||
|
||||
private void ClientOnSimWideDeletes(IClientAPI client, UUID agentID, int flags, UUID targetID)
|
||||
|
|
|
@ -614,10 +614,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
UUID previousOwner = LandData.OwnerID;
|
||||
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
// m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
SendLandUpdateToAvatarsOverMe(true);
|
||||
|
||||
if (sellObjects) SellLandObjects(previousOwner);
|
||||
if (sellObjects)
|
||||
SellLandObjects(previousOwner);
|
||||
m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
}
|
||||
|
||||
public void DeedToGroup(UUID groupID)
|
||||
|
@ -632,7 +631,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
SendLandUpdateToAvatarsOverMe(true);
|
||||
}
|
||||
|
||||
public bool IsEitherBannedOrRestricted(UUID avatar)
|
||||
|
@ -842,6 +840,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
if (avatar.IsNPC)
|
||||
return;
|
||||
|
||||
ILandObject over = null;
|
||||
try
|
||||
{
|
||||
|
@ -871,6 +872,49 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
});
|
||||
}
|
||||
|
||||
public void SendLandUpdateToAvatars()
|
||||
{
|
||||
m_scene.ForEachScenePresence(delegate (ScenePresence avatar)
|
||||
{
|
||||
if (avatar.IsNPC)
|
||||
return;
|
||||
|
||||
if(avatar.IsChildAgent)
|
||||
{
|
||||
SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, avatar.ControllingClient);
|
||||
return;
|
||||
}
|
||||
ILandObject over = null;
|
||||
try
|
||||
{
|
||||
over =
|
||||
m_scene.LandChannel.GetLandObject(Util.Clamp<int>((int)Math.Round(avatar.AbsolutePosition.X), 0, ((int)m_scene.RegionInfo.RegionSizeX - 1)),
|
||||
Util.Clamp<int>((int)Math.Round(avatar.AbsolutePosition.Y), 0, ((int)m_scene.RegionInfo.RegionSizeY - 1)));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
m_log.Warn("[LAND]: " + "unable to get land at x: " + Math.Round(avatar.AbsolutePosition.X) + " y: " +
|
||||
Math.Round(avatar.AbsolutePosition.Y));
|
||||
}
|
||||
|
||||
if (over != null)
|
||||
{
|
||||
if (over.LandData.LocalID == LandData.LocalID)
|
||||
{
|
||||
if (m_scene.RegionInfo.RegionSettings.AllowDamage)
|
||||
avatar.Invulnerable = false;
|
||||
else
|
||||
avatar.Invulnerable = (over.LandData.Flags & (uint)ParcelFlags.AllowDamage) == 0;
|
||||
|
||||
avatar.currentParcelUUID = LandData.GlobalID;
|
||||
SendLandProperties(0, true, LandChannel.LAND_RESULT_SINGLE, avatar.ControllingClient);
|
||||
return;
|
||||
}
|
||||
}
|
||||
SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, avatar.ControllingClient);
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AccessList Functions
|
||||
|
|
Loading…
Reference in New Issue