osSetParcelDetails: add more land update code

0.9.0-post-fixes
UbitUmarov 2017-07-12 07:27:21 +01:00
parent a069ed09a8
commit aff9c345dd
4 changed files with 31 additions and 5 deletions

View File

@ -88,6 +88,7 @@ namespace OpenSim.Region.Framework.Interfaces
bool IsForcefulBansAllowed(); bool IsForcefulBansAllowed();
void UpdateLandObject(int localID, LandData data); void UpdateLandObject(int localID, LandData data);
void SendParcelsOverlay(IClientAPI client);
void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient); void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);
void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);

View File

@ -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) public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
{ {
if (m_landManagementModule != null) if (m_landManagementModule != null)

View File

@ -1617,6 +1617,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
bool changed = false; bool changed = false;
bool changedSeeAvs = 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 // Process the rules, not sure what the impact would be of changing owner or group
for (int idx = 0; idx < rules.Length;) for (int idx = 0; idx < rules.Length;)
@ -1719,6 +1721,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
changed = true; changed = true;
changedSeeAvs = true; changedSeeAvs = true;
changedoverlay = true;
changedneedupdate = true;
newLand.SeeAVs = newavs; newLand.SeeAVs = newavs;
} }
break; break;
@ -1744,19 +1748,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
if(changed) if(changed)
{ {
World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); World.LandChannel.UpdateLandObject(newLand.LocalID, newLand);
if(changedSeeAvs) if(changedneedupdate)
{ {
UUID parcelID= newLand.GlobalID; 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 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) public double osList2Double(LSL_Types.list src, int index)

View File

@ -109,6 +109,7 @@ namespace OpenSim.Tests.Common
public bool IsLandPrimCountTainted() { return false; } public bool IsLandPrimCountTainted() { return false; }
public bool IsForcefulBansAllowed() { return false; } public bool IsForcefulBansAllowed() { return false; }
public void UpdateLandObject(int localID, LandData data) {} 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 ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {}
public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {} public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {} public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}