mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Moved all HG1 operations to HGGridConnector.cs and HypergridServerConnector.cs/HypergridServiceConnector.cs, away from Region.Communications and HGNetworkServersInfo.
Fixed small bugs with hyperlinked regions' map positions.
This commit is contained in:
@@ -38,6 +38,7 @@ using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Capabilities;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
|
||||
namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||
@@ -46,11 +47,19 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public readonly IHyperlink m_hg;
|
||||
|
||||
public HGSceneCommunicationService(CommunicationsManager commsMan, IHyperlink hg) : base(commsMan)
|
||||
private IHyperlinkService m_hg;
|
||||
IHyperlinkService HyperlinkService
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_hg == null)
|
||||
m_hg = m_scene.RequestModuleInterface<IHyperlinkService>();
|
||||
return m_hg;
|
||||
}
|
||||
}
|
||||
|
||||
public HGSceneCommunicationService(CommunicationsManager commsMan) : base(commsMan)
|
||||
{
|
||||
m_hg = hg;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,13 +138,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||
/// Hypergrid mod start
|
||||
///
|
||||
///
|
||||
bool isHyperLink = m_hg.IsHyperlinkRegion(reg.RegionHandle);
|
||||
bool isHyperLink = (HyperlinkService.GetHyperlinkRegion(reg.RegionHandle) != null);
|
||||
bool isHomeUser = true;
|
||||
ulong realHandle = regionHandle;
|
||||
CachedUserInfo uinfo = m_commsProvider.UserProfileCacheService.GetUserDetails(avatar.UUID);
|
||||
if (uinfo != null)
|
||||
{
|
||||
isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile);
|
||||
isHomeUser = HyperlinkService.IsLocalUser(uinfo.UserProfile.ID);
|
||||
realHandle = m_hg.FindRegionHandle(regionHandle);
|
||||
m_log.Debug("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user