diff options
author | UbitUmarov | 2017-07-12 07:27:21 +0100 |
---|---|---|
committer | UbitUmarov | 2017-07-12 07:27:21 +0100 |
commit | aff9c345dddfa290222ceaf42b6c452a590a2276 (patch) | |
tree | 661bb6fa350162a0d3879e701bfe5a0ec6c1cf3a /OpenSim/Region/ScriptEngine | |
parent | osSetParcelDetails: make seeAVs send updates. This is a temporary patch, thi... (diff) | |
download | opensim-SC_OLD-aff9c345dddfa290222ceaf42b6c452a590a2276.zip opensim-SC_OLD-aff9c345dddfa290222ceaf42b6c452a590a2276.tar.gz opensim-SC_OLD-aff9c345dddfa290222ceaf42b6c452a590a2276.tar.bz2 opensim-SC_OLD-aff9c345dddfa290222ceaf42b6c452a590a2276.tar.xz |
osSetParcelDetails: add more land update code
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index f274cd3..79367fb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1617,6 +1617,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1617 | 1617 | ||
1618 | bool changed = false; | 1618 | bool changed = false; |
1619 | bool changedSeeAvs = false; | 1619 | bool changedSeeAvs = false; |
1620 | bool changedoverlay = false; | ||
1621 | bool changedneedupdate = false; | ||
1620 | 1622 | ||
1621 | // Process the rules, not sure what the impact would be of changing owner or group | 1623 | // Process the rules, not sure what the impact would be of changing owner or group |
1622 | for (int idx = 0; idx < rules.Length;) | 1624 | for (int idx = 0; idx < rules.Length;) |
@@ -1719,6 +1721,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1719 | { | 1721 | { |
1720 | changed = true; | 1722 | changed = true; |
1721 | changedSeeAvs = true; | 1723 | changedSeeAvs = true; |
1724 | changedoverlay = true; | ||
1725 | changedneedupdate = true; | ||
1722 | newLand.SeeAVs = newavs; | 1726 | newLand.SeeAVs = newavs; |
1723 | } | 1727 | } |
1724 | break; | 1728 | break; |
@@ -1744,19 +1748,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1744 | } | 1748 | } |
1745 | if(changed) | 1749 | if(changed) |
1746 | { | 1750 | { |
1747 | World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); | 1751 | World.LandChannel.UpdateLandObject(newLand.LocalID, newLand); |
1748 | 1752 | ||
1749 | if(changedSeeAvs) | 1753 | if(changedneedupdate) |
1750 | { | 1754 | { |
1751 | UUID parcelID= newLand.GlobalID; | 1755 | UUID parcelID= newLand.GlobalID; |
1752 | World.ForEachScenePresence(delegate (ScenePresence avatar) | 1756 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) |
1753 | { | 1757 | { |
1754 | if (avatar != null && !avatar.IsDeleted && avatar.currentParcelUUID == parcelID ) | 1758 | if (avatar == null || avatar.IsDeleted || avatar.IsInTransit) |
1759 | return; | ||
1760 | |||
1761 | if(changedSeeAvs && avatar.currentParcelUUID == parcelID ) | ||
1755 | avatar.currentParcelUUID = parcelID; // force parcel flags review | 1762 | avatar.currentParcelUUID = parcelID; // force parcel flags review |
1763 | |||
1764 | if(avatar.ControllingClient == null) | ||
1765 | return; | ||
1766 | |||
1767 | // this will be needed for some things like damage etc | ||
1768 | // if(avatar.currentParcelUUID == parcelID) | ||
1769 | // startLandObject.SendLandUpdateToClient(avatar.ControllingClient); | ||
1770 | |||
1771 | if(changedoverlay && !avatar.IsNPC) | ||
1772 | World.LandChannel.SendParcelsOverlay(avatar.ControllingClient); | ||
1756 | }); | 1773 | }); |
1757 | } | 1774 | } |
1758 | } | 1775 | } |
1759 | |||
1760 | } | 1776 | } |
1761 | 1777 | ||
1762 | public double osList2Double(LSL_Types.list src, int index) | 1778 | public double osList2Double(LSL_Types.list src, int index) |