aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-04-03 17:19:28 +0100
committerUbitUmarov2017-04-03 17:19:28 +0100
commit2bb5e985740b7c6aa75cd31aa057d39d56f024b6 (patch)
treebbc3c48111f874ef69bf0bfb10f649293f824c0d /OpenSim/Region/Framework/Scenes/Scene.cs
parentadd bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject land) pe... (diff)
downloadopensim-SC-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.zip
opensim-SC-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.tar.gz
opensim-SC-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.tar.bz2
opensim-SC-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.tar.xz
add EXPERIMENTAL osObjectTeleport(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer stop)
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs31
1 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index c5b082c..3b9f551 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -808,6 +808,8 @@ namespace OpenSim.Region.Framework.Scenes
808 private float m_minReprioritizationDistance = 32f; 808 private float m_minReprioritizationDistance = 32f;
809 public bool ObjectsCullingByDistance = false; 809 public bool ObjectsCullingByDistance = false;
810 810
811 private ExpiringCache<UUID, UUID> TeleportTargetsCoolDown = new ExpiringCache<UUID, UUID>();
812
811 public AgentCircuitManager AuthenticateHandler 813 public AgentCircuitManager AuthenticateHandler
812 { 814 {
813 get { return m_authenticateHandler; } 815 get { return m_authenticateHandler; }
@@ -2983,15 +2985,14 @@ namespace OpenSim.Region.Framework.Scenes
2983 // Return 'true' if position inside region. 2985 // Return 'true' if position inside region.
2984 public bool PositionIsInCurrentRegion(Vector3 pos) 2986 public bool PositionIsInCurrentRegion(Vector3 pos)
2985 { 2987 {
2986 bool ret = false; 2988 int xx = (int)pos.X;
2987 int xx = (int)Math.Floor(pos.X); 2989 if (xx < 0 || xx >= RegionInfo.RegionSizeX)
2988 int yy = (int)Math.Floor(pos.Y);
2989 if (xx < 0 || yy < 0)
2990 return false; 2990 return false;
2991 2991
2992 if (xx < RegionInfo.RegionSizeX && yy < RegionInfo.RegionSizeY ) 2992 int yy = (int)pos.Y;
2993 ret = true; 2993 if (yy < 0 || yy >= RegionInfo.RegionSizeX)
2994 return ret; 2994 return false;
2995 return true;
2995 } 2996 }
2996 2997
2997 /// <summary> 2998 /// <summary>
@@ -6526,5 +6527,21 @@ Environment.Exit(1);
6526 6527
6527 m_eventManager.TriggerExtraSettingChanged(this, name, String.Empty); 6528 m_eventManager.TriggerExtraSettingChanged(this, name, String.Empty);
6528 } 6529 }
6530
6531 public bool InTeleportTargetsCoolDown(UUID sourceID, UUID targetID, double timeout)
6532 {
6533 lock(TeleportTargetsCoolDown)
6534 {
6535 UUID lastSource = UUID.Zero;
6536 TeleportTargetsCoolDown.TryGetValue(targetID, out lastSource);
6537 if(lastSource == UUID.Zero)
6538 {
6539 TeleportTargetsCoolDown.Add(targetID, sourceID, timeout);
6540 return false;
6541 }
6542 TeleportTargetsCoolDown.AddOrUpdate(targetID, sourceID, timeout);
6543 return lastSource == sourceID;
6544 }
6545 }
6529 } 6546 }
6530} 6547}