diff options
author | Diva Canto | 2010-01-17 18:04:55 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-17 18:04:55 -0800 |
commit | b2e6ec9e12ad07eb08496ebe8ca0476b793017d5 (patch) | |
tree | ac72f03b9cfca6f344d697f6d7581e5147ccf450 /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |
parent | Oops, forgot this one. (diff) | |
download | opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.zip opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.tar.gz opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.tar.bz2 opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.tar.xz |
Agent gets there through the Gatekeeper, but still a few quirks to fix.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 5d88311..e5a862d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | 31 | ||
32 | using OpenSim.Framework; | ||
32 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
33 | using OpenSim.Region.Framework.Scenes; | 34 | using OpenSim.Region.Framework.Scenes; |
34 | using OpenSim.Services.Connectors.Hypergrid; | 35 | using OpenSim.Services.Connectors.Hypergrid; |
@@ -58,6 +59,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 | ||
62 | private GatekeeperServiceConnector m_GatekeeperConnector; | ||
63 | |||
61 | #region ISharedRegionModule | 64 | #region ISharedRegionModule |
62 | 65 | ||
63 | public override string Name | 66 | public override string Name |
@@ -74,6 +77,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
74 | if (name == Name) | 77 | if (name == Name) |
75 | { | 78 | { |
76 | m_agentsInTransit = new List<UUID>(); | 79 | m_agentsInTransit = new List<UUID>(); |
80 | m_GatekeeperConnector = new GatekeeperServiceConnector(); | ||
77 | m_Enabled = true; | 81 | m_Enabled = true; |
78 | m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | 82 | m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
79 | } | 83 | } |
@@ -131,6 +135,29 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
131 | return true; | 135 | return true; |
132 | } | 136 | } |
133 | 137 | ||
138 | protected override bool CreateAgent(GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) | ||
139 | { | ||
140 | reason = string.Empty; | ||
141 | if (reg.RegionLocX != finalDestination.RegionLocX && reg.RegionLocY != finalDestination.RegionLocY) | ||
142 | { | ||
143 | // this user is going to another grid | ||
144 | reg.RegionName = finalDestination.RegionName; | ||
145 | return m_GatekeeperConnector.CreateAgent(reg, agentCircuit, teleportFlags, out reason); | ||
146 | } | ||
147 | |||
148 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); | ||
149 | } | ||
150 | |||
151 | protected override bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) | ||
152 | { | ||
153 | if (reg.RegionLocX != finalDestination.RegionLocX && reg.RegionLocY != finalDestination.RegionLocY) | ||
154 | { | ||
155 | // this user is going to another grid | ||
156 | return m_GatekeeperConnector.UpdateAgent(reg, agent); | ||
157 | } | ||
158 | |||
159 | return m_aScene.SimulationService.UpdateAgent(reg, agent); | ||
160 | } | ||
134 | 161 | ||
135 | #endregion | 162 | #endregion |
136 | } | 163 | } |