aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-01-21 06:37:29 +0000
committerUbitUmarov2017-01-21 06:37:29 +0000
commit0a5d6671cec0eaea00127e29d4237cc4614d111d (patch)
tree478fd1c3a172f90dbbae1bb624698bef6d140c2b /OpenSim/Region/Framework/Scenes/Scene.cs
parentfix CanObjectEntry and CanTerraformLand group permissions (diff)
downloadopensim-SC-0a5d6671cec0eaea00127e29d4237cc4614d111d.zip
opensim-SC-0a5d6671cec0eaea00127e29d4237cc4614d111d.tar.gz
opensim-SC-0a5d6671cec0eaea00127e29d4237cc4614d111d.tar.bz2
opensim-SC-0a5d6671cec0eaea00127e29d4237cc4614d111d.tar.xz
fix llScriptDanger(); don't call old ScriptDamage on ossl health functions
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs88
1 files changed, 41 insertions, 47 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d9b0327..ca298be 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5083,65 +5083,59 @@ Label_GroupsDone:
5083 #endregion 5083 #endregion
5084 5084
5085 #region Script Engine 5085 #region Script Engine
5086 5086 public bool LSLScriptDanger(SceneObjectPart part, Vector3 pos)
5087 private bool ScriptDanger(SceneObjectPart part, Vector3 pos)
5088 { 5087 {
5088
5089 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y); 5089 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y);
5090 if (part != null) 5090 if (parcel == null)
5091 { 5091 return true;
5092 if (parcel != null) 5092
5093 { 5093 LandData ldata = parcel.LandData;
5094 if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0) 5094 if (ldata == null)
5095 { 5095 return true;
5096 return true; 5096
5097 } 5097 uint landflags = ldata.Flags;
5098 else if ((part.OwnerID == parcel.LandData.OwnerID) || Permissions.IsGod(part.OwnerID)) 5098
5099 { 5099 uint mask = (uint)(ParcelFlags.CreateObjects | ParcelFlags.AllowAPrimitiveEntry);
5100 return true; 5100 if((landflags & mask) != mask)
5101 } 5101 return true;
5102 else if (((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0) 5102
5103 && (parcel.LandData.GroupID != UUID.Zero) && (parcel.LandData.GroupID == part.GroupID)) 5103 if((landflags & (uint)ParcelFlags.AllowOtherScripts) != 0)
5104 { 5104 return false;
5105 return true;
5106 }
5107 else
5108 {
5109 return false;
5110 }
5111 }
5112 else
5113 {
5114 5105
5115 if (pos.X > 0f && pos.X < RegionInfo.RegionSizeX && pos.Y > 0f && pos.Y < RegionInfo.RegionSizeY) 5106 if(part == null)
5116 { 5107 return true;
5117 // The only time parcel != null when an object is inside a region is when 5108 if(part.GroupID == ldata.GroupID && (landflags & (uint)ParcelFlags.AllowGroupScripts) != 0)
5118 // there is nothing behind the landchannel. IE, no land plugin loaded.
5119 return true;
5120 }
5121 else
5122 {
5123 // The object is outside of this region. Stop piping events to it.
5124 return false;
5125 }
5126 }
5127 }
5128 else
5129 {
5130 return false; 5109 return false;
5131 } 5110
5111 return true;
5132 } 5112 }
5133 5113
5134 public bool ScriptDanger(uint localID, Vector3 pos) 5114 private bool ScriptDanger(SceneObjectPart part, Vector3 pos)
5135 { 5115 {
5136 SceneObjectPart part = GetSceneObjectPart(localID); 5116 if (part == null)
5137 if (part != null) 5117 return false;
5118
5119 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y);
5120 if (parcel != null)
5138 { 5121 {
5139 return ScriptDanger(part, pos); 5122 if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0)
5123 return true;
5124
5125 if ((part.OwnerID == parcel.LandData.OwnerID) || Permissions.IsGod(part.OwnerID))
5126 return true;
5127
5128 if (((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
5129 && (parcel.LandData.GroupID != UUID.Zero) && (parcel.LandData.GroupID == part.GroupID))
5130 return true;
5140 } 5131 }
5141 else 5132 else
5142 { 5133 {
5143 return false; 5134 if (pos.X > 0f && pos.X < RegionInfo.RegionSizeX && pos.Y > 0f && pos.Y < RegionInfo.RegionSizeY)
5135 return true;
5144 } 5136 }
5137
5138 return false;
5145 } 5139 }
5146 5140
5147 public bool PipeEventsForScript(uint localID) 5141 public bool PipeEventsForScript(uint localID)