aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2013-01-03 14:27:21 +0000
committerUbitUmarov2013-01-03 14:27:21 +0000
commita285ff7e6942f9b55b18b00a765a5b4491fba011 (patch)
tree51f3209e40fa183375e1fa76580a6d8d7033537f /OpenSim/Region/Framework
parentmake ResetMoveToTarget cancel any 'force' waiting to be applied to avatar (diff)
downloadopensim-SC-a285ff7e6942f9b55b18b00a765a5b4491fba011.zip
opensim-SC-a285ff7e6942f9b55b18b00a765a5b4491fba011.tar.gz
opensim-SC-a285ff7e6942f9b55b18b00a765a5b4491fba011.tar.bz2
opensim-SC-a285ff7e6942f9b55b18b00a765a5b4491fba011.tar.xz
check land permitions on sit target for unscripted sits
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c16c544..5087882 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2247,6 +2247,17 @@ namespace OpenSim.Region.Framework.Scenes
2247 return false; 2247 return false;
2248 } 2248 }
2249 2249
2250
2251 private bool CanEnterLandPosition(Vector3 testPos)
2252 {
2253 ILandObject land = m_scene.LandChannel.GetLandObject(testPos.X, testPos.Y);
2254
2255 if (land == null || land.LandData.Name == "NO_LAND")
2256 return true;
2257
2258 return land.CanBeOnThisLand(UUID,testPos.Z);
2259 }
2260
2250 // status 2261 // status
2251 // < 0 ignore 2262 // < 0 ignore
2252 // 0 bad sit spot 2263 // 0 bad sit spot
@@ -2265,6 +2276,12 @@ namespace OpenSim.Region.Framework.Scenes
2265 if (part == null) 2276 if (part == null)
2266 return; 2277 return;
2267 2278
2279 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation();
2280 if(!CanEnterLandPosition(targetPos))
2281 {
2282 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot");
2283 return;
2284 }
2268// m_log.InfoFormat("physsit {0} {1}", offset.ToString(),Orientation.ToString()); 2285// m_log.InfoFormat("physsit {0} {1}", offset.ToString(),Orientation.ToString());
2269 2286
2270 RemoveFromPhysicalScene(); 2287 RemoveFromPhysicalScene();