mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Fix up QueryAccess to also check parcels
This commit is contained in:
@@ -285,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId))
|
||||
if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId, Vector3.Zero))
|
||||
{
|
||||
sp.ControllingClient.SendTeleportFailed("The destination region has refused access");
|
||||
return;
|
||||
@@ -797,8 +797,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
|
||||
if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId))
|
||||
if (!scene.SimulationService.QueryAccess(neighbourRegion, agent.ControllingClient.AgentId, newpos))
|
||||
{
|
||||
agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel");
|
||||
if (r == null)
|
||||
{
|
||||
r = new ExpiringCache<ulong, DateTime>();
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID id)
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
|
||||
{
|
||||
if (destination == null)
|
||||
return false;
|
||||
@@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
foreach (Scene s in m_sceneList)
|
||||
{
|
||||
if (s.RegionInfo.RegionID == destination.RegionID)
|
||||
return s.QueryAccess(id);
|
||||
return s.QueryAccess(id, position);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -239,18 +239,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID id)
|
||||
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position)
|
||||
{
|
||||
if (destination == null)
|
||||
return false;
|
||||
|
||||
// Try local first
|
||||
if (m_localBackend.QueryAccess(destination, id))
|
||||
if (m_localBackend.QueryAccess(destination, id, position))
|
||||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
|
||||
return m_remoteConnector.QueryAccess(destination, id);
|
||||
return m_remoteConnector.QueryAccess(destination, id, position);
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user