osSetParcelDetails: add more land update code
parent
a069ed09a8
commit
aff9c345dd
|
@ -88,6 +88,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
|
||||
bool IsForcefulBansAllowed();
|
||||
void UpdateLandObject(int localID, LandData data);
|
||||
void SendParcelsOverlay(IClientAPI client);
|
||||
void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);
|
||||
void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
|
||||
void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
|
||||
|
|
|
@ -176,6 +176,14 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void SendParcelsOverlay(IClientAPI client)
|
||||
{
|
||||
if (m_landManagementModule != null)
|
||||
{
|
||||
m_landManagementModule.SendParcelOverlay(client);
|
||||
}
|
||||
}
|
||||
|
||||
public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
|
||||
{
|
||||
if (m_landManagementModule != null)
|
||||
|
|
|
@ -1617,6 +1617,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
bool changed = false;
|
||||
bool changedSeeAvs = false;
|
||||
bool changedoverlay = false;
|
||||
bool changedneedupdate = false;
|
||||
|
||||
// Process the rules, not sure what the impact would be of changing owner or group
|
||||
for (int idx = 0; idx < rules.Length;)
|
||||
|
@ -1719,6 +1721,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
changed = true;
|
||||
changedSeeAvs = true;
|
||||
changedoverlay = true;
|
||||
changedneedupdate = true;
|
||||
newLand.SeeAVs = newavs;
|
||||
}
|
||||
break;
|
||||
|
@ -1744,19 +1748,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
if(changed)
|
||||
{
|
||||
World.LandChannel.UpdateLandObject(newLand.LocalID,newLand);
|
||||
World.LandChannel.UpdateLandObject(newLand.LocalID, newLand);
|
||||
|
||||
if(changedSeeAvs)
|
||||
if(changedneedupdate)
|
||||
{
|
||||
UUID parcelID= newLand.GlobalID;
|
||||
World.ForEachScenePresence(delegate (ScenePresence avatar)
|
||||
World.ForEachRootScenePresence(delegate (ScenePresence avatar)
|
||||
{
|
||||
if (avatar != null && !avatar.IsDeleted && avatar.currentParcelUUID == parcelID )
|
||||
if (avatar == null || avatar.IsDeleted || avatar.IsInTransit)
|
||||
return;
|
||||
|
||||
if(changedSeeAvs && avatar.currentParcelUUID == parcelID )
|
||||
avatar.currentParcelUUID = parcelID; // force parcel flags review
|
||||
|
||||
if(avatar.ControllingClient == null)
|
||||
return;
|
||||
|
||||
// this will be needed for some things like damage etc
|
||||
// if(avatar.currentParcelUUID == parcelID)
|
||||
// startLandObject.SendLandUpdateToClient(avatar.ControllingClient);
|
||||
|
||||
if(changedoverlay && !avatar.IsNPC)
|
||||
World.LandChannel.SendParcelsOverlay(avatar.ControllingClient);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public double osList2Double(LSL_Types.list src, int index)
|
||||
|
|
|
@ -109,6 +109,7 @@ namespace OpenSim.Tests.Common
|
|||
public bool IsLandPrimCountTainted() { return false; }
|
||||
public bool IsForcefulBansAllowed() { return false; }
|
||||
public void UpdateLandObject(int localID, LandData data) {}
|
||||
public void SendParcelsOverlay(IClientAPI client) {}
|
||||
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {}
|
||||
public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
|
||||
public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}
|
||||
|
|
Loading…
Reference in New Issue