From 487cb51f69ac2f713797de03eb26a4b53afcfade Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 10 Jun 2011 17:22:17 -0700 Subject: 3rd way of reseting the HG Map. This time, don't use the grid service; instead keep track of which map blocks each client has seen in the region, and reset exactly those when the client closes. --- .../EntityTransfer/HGEntityTransferModule.cs | 25 ---------------------- 1 file changed, 25 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 8df89ad..4d77ef4 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -148,9 +148,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer base.AgentHasMovedAway(sp, logout); if (logout) { - // Reset the map - ResetMap(sp); - // Log them out of this grid m_aScene.PresenceService.LogoutAgent(sp.ControllingClient.SessionId); } @@ -285,28 +282,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } - protected void ResetMap(ScenePresence sp) - { - List regions = m_Scenes[0].GridService.GetRegionRange(m_Scenes[0].RegionInfo.ScopeID, 0, 17000 * (int)Constants.RegionSize, 0, 17000 * (int)Constants.RegionSize); - m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Resetting {0} tiles on the map", regions.Count); - if (regions != null) - { - List mapBlocks = new List(); - foreach (GridRegion r in regions) - { - MapBlockData mblock = new MapBlockData(); - mblock.X = (ushort)(r.RegionLocX / Constants.RegionSize); - mblock.Y = (ushort)(r.RegionLocY / Constants.RegionSize); - mblock.Name = ""; - mblock.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's - mblock.MapImageId = UUID.Zero; - mapBlocks.Add(mblock); - } - sp.ControllingClient.SendMapBlock(mapBlocks, 0); - } - - } - #endregion #region IUserAgentVerificationModule -- cgit v1.1