diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 37d81a3..8df89ad 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -147,8 +147,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
147 | { | 147 | { |
148 | base.AgentHasMovedAway(sp, logout); | 148 | base.AgentHasMovedAway(sp, logout); |
149 | if (logout) | 149 | if (logout) |
150 | { | ||
151 | // Reset the map | ||
152 | ResetMap(sp); | ||
153 | |||
150 | // Log them out of this grid | 154 | // Log them out of this grid |
151 | m_aScene.PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | 155 | m_aScene.PresenceService.LogoutAgent(sp.ControllingClient.SessionId); |
156 | } | ||
152 | } | 157 | } |
153 | 158 | ||
154 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) | 159 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) |
@@ -280,6 +285,27 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
280 | 285 | ||
281 | } | 286 | } |
282 | 287 | ||
288 | protected void ResetMap(ScenePresence sp) | ||
289 | { | ||
290 | List<GridRegion> regions = m_Scenes[0].GridService.GetRegionRange(m_Scenes[0].RegionInfo.ScopeID, 0, 17000 * (int)Constants.RegionSize, 0, 17000 * (int)Constants.RegionSize); | ||
291 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Resetting {0} tiles on the map", regions.Count); | ||
292 | if (regions != null) | ||
293 | { | ||
294 | List<MapBlockData> mapBlocks = new List<MapBlockData>(); | ||
295 | foreach (GridRegion r in regions) | ||
296 | { | ||
297 | MapBlockData mblock = new MapBlockData(); | ||
298 | mblock.X = (ushort)(r.RegionLocX / Constants.RegionSize); | ||
299 | mblock.Y = (ushort)(r.RegionLocY / Constants.RegionSize); | ||
300 | mblock.Name = ""; | ||
301 | mblock.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's | ||
302 | mblock.MapImageId = UUID.Zero; | ||
303 | mapBlocks.Add(mblock); | ||
304 | } | ||
305 | sp.ControllingClient.SendMapBlock(mapBlocks, 0); | ||
306 | } | ||
307 | |||
308 | } | ||
283 | 309 | ||
284 | #endregion | 310 | #endregion |
285 | 311 | ||