mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
change other expire
This commit is contained in:
@@ -756,7 +756,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
private float m_minReprioritizationDistance = 32f;
|
||||
public bool ObjectsCullingByDistance = false;
|
||||
|
||||
private ExpiringCache<UUID, UUID> TeleportTargetsCoolDown = new ExpiringCache<UUID, UUID>();
|
||||
private ExpiringCacheOS<UUID, UUID> TeleportTargetsCoolDown = new ExpiringCacheOS<UUID, UUID>();
|
||||
|
||||
public AgentCircuitManager AuthenticateHandler
|
||||
{
|
||||
@@ -6384,20 +6384,11 @@ Environment.Exit(1);
|
||||
m_eventManager.TriggerExtraSettingChanged(this, name, String.Empty);
|
||||
}
|
||||
|
||||
public bool InTeleportTargetsCoolDown(UUID sourceID, UUID targetID, double timeout)
|
||||
public bool InTeleportTargetsCoolDown(UUID sourceID, UUID targetID, int timeout)
|
||||
{
|
||||
lock(TeleportTargetsCoolDown)
|
||||
{
|
||||
UUID lastSource = UUID.Zero;
|
||||
TeleportTargetsCoolDown.TryGetValue(targetID, out lastSource);
|
||||
if(lastSource == UUID.Zero)
|
||||
{
|
||||
TeleportTargetsCoolDown.Add(targetID, sourceID, timeout);
|
||||
return false;
|
||||
}
|
||||
TeleportTargetsCoolDown.AddOrUpdate(targetID, sourceID, timeout);
|
||||
if(TeleportTargetsCoolDown.TryGetValue(targetID, timeout, out UUID lastSource))
|
||||
return lastSource == sourceID;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1038,7 +1038,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if(Scene.PositionIsInCurrentRegion(targetPosition))
|
||||
{
|
||||
if(Scene.InTeleportTargetsCoolDown(UUID, sourceID, 1.0))
|
||||
if(Scene.InTeleportTargetsCoolDown(UUID, sourceID, 1000))
|
||||
{
|
||||
inTransit = false;
|
||||
return -2;
|
||||
@@ -1085,7 +1085,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(Scene.InTeleportTargetsCoolDown(UUID, sourceID, 20.0))
|
||||
if(Scene.InTeleportTargetsCoolDown(UUID, sourceID, 20000))
|
||||
{
|
||||
inTransit = false;
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user