diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
5 files changed, 54 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index e92f072..d02a305 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -162,12 +162,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
162 | // one and we're done otherwise, ask for a rebake | 162 | // one and we're done otherwise, ask for a rebake |
163 | if (checkonly) return false; | 163 | if (checkonly) return false; |
164 | 164 | ||
165 | m_log.InfoFormat("[AVFACTORY]: missing baked texture {0}, requesting rebake",face.TextureID); | 165 | m_log.InfoFormat("[AVFACTORY]: missing baked texture {0}, requesting rebake", face.TextureID); |
166 | client.SendRebakeAvatarTextures(face.TextureID); | 166 | client.SendRebakeAvatarTextures(face.TextureID); |
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | m_log.DebugFormat("[AVFACTORY]: completed texture check for {0}", client.AgentId); | 170 | m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0}", client.AgentId); |
171 | 171 | ||
172 | // If we only found default textures, then the appearance is not cached | 172 | // If we only found default textures, then the appearance is not cached |
173 | return (defonly ? false : true); | 173 | return (defonly ? false : true); |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 02efcd8..a00e240 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -50,6 +50,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
50 | { | 50 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | /// <summary> | ||
54 | /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. | ||
55 | /// </summary> | ||
56 | public int MaxTransferDistance { get; set; } | ||
57 | |||
53 | protected bool m_Enabled = false; | 58 | protected bool m_Enabled = false; |
54 | protected Scene m_aScene; | 59 | protected Scene m_aScene; |
55 | protected List<Scene> m_Scenes = new List<Scene>(); | 60 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -78,13 +83,26 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
78 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 83 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
79 | if (name == Name) | 84 | if (name == Name) |
80 | { | 85 | { |
81 | m_agentsInTransit = new List<UUID>(); | 86 | InitialiseCommon(source); |
82 | m_Enabled = true; | 87 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
83 | m_log.InfoFormat("[ENTITY TRANSFER MODULE]: {0} enabled.", Name); | ||
84 | } | 88 | } |
85 | } | 89 | } |
86 | } | 90 | } |
87 | 91 | ||
92 | /// <summary> | ||
93 | /// Initialize config common for this module and any descendents. | ||
94 | /// </summary> | ||
95 | /// <param name="source"></param> | ||
96 | protected virtual void InitialiseCommon(IConfigSource source) | ||
97 | { | ||
98 | IConfig transferConfig = source.Configs["EntityTransfer"]; | ||
99 | if (transferConfig != null) | ||
100 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); | ||
101 | |||
102 | m_agentsInTransit = new List<UUID>(); | ||
103 | m_Enabled = true; | ||
104 | } | ||
105 | |||
88 | public virtual void PostInitialise() | 106 | public virtual void PostInitialise() |
89 | { | 107 | { |
90 | } | 108 | } |
@@ -114,7 +132,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
114 | return; | 132 | return; |
115 | } | 133 | } |
116 | 134 | ||
117 | |||
118 | public virtual void RemoveRegion(Scene scene) | 135 | public virtual void RemoveRegion(Scene scene) |
119 | { | 136 | { |
120 | if (!m_Enabled) | 137 | if (!m_Enabled) |
@@ -129,7 +146,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
129 | { | 146 | { |
130 | if (!m_Enabled) | 147 | if (!m_Enabled) |
131 | return; | 148 | return; |
132 | |||
133 | } | 149 | } |
134 | 150 | ||
135 | #endregion | 151 | #endregion |
@@ -205,8 +221,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
205 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); | 221 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); |
206 | return; | 222 | return; |
207 | } | 223 | } |
208 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} {2}@{3}", | 224 | |
209 | finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID, finalDestination.ServerURI); | 225 | uint curX = 0, curY = 0; |
226 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); | ||
227 | int curCellX = (int)(curX / Constants.RegionSize); | ||
228 | int curCellY = (int)(curY / Constants.RegionSize); | ||
229 | int destCellX = (int)(finalDestination.RegionLocX / Constants.RegionSize); | ||
230 | int destCellY = (int)(finalDestination.RegionLocY / Constants.RegionSize); | ||
231 | |||
232 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY); | ||
233 | // | ||
234 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}", | ||
235 | // destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI); | ||
210 | 236 | ||
211 | // Check that these are not the same coordinates | 237 | // Check that these are not the same coordinates |
212 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && | 238 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && |
@@ -217,6 +243,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
217 | return; | 243 | return; |
218 | } | 244 | } |
219 | 245 | ||
246 | if (Math.Abs(curCellX - destCellX) > MaxTransferDistance || Math.Abs(curCellY - destCellY) > MaxTransferDistance) | ||
247 | { | ||
248 | sp.ControllingClient.SendTeleportFailed( | ||
249 | string.Format( | ||
250 | "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way", | ||
251 | finalDestination.RegionName, destCellX, destCellY, | ||
252 | sp.Scene.RegionInfo.RegionName, curCellX, curCellY, | ||
253 | MaxTransferDistance)); | ||
254 | |||
255 | return; | ||
256 | } | ||
257 | |||
220 | // | 258 | // |
221 | // This is it | 259 | // This is it |
222 | // | 260 | // |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 8858ad5..6daae62 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -67,10 +67,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
67 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 67 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
68 | if (name == Name) | 68 | if (name == Name) |
69 | { | 69 | { |
70 | m_agentsInTransit = new List<UUID>(); | 70 | InitialiseCommon(source); |
71 | 71 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | |
72 | m_Enabled = true; | ||
73 | m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | ||
74 | } | 72 | } |
75 | } | 73 | } |
76 | } | 74 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index cfd8ffb..27eb178 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -297,9 +297,10 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
297 | if (m_UserCache.ContainsKey(id)) | 297 | if (m_UserCache.ContainsKey(id)) |
298 | return; | 298 | return; |
299 | 299 | ||
300 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, craetorData {1}", id, creatorData); | ||
301 | |||
300 | UserData user = new UserData(); | 302 | UserData user = new UserData(); |
301 | user.Id = id; | 303 | user.Id = id; |
302 | |||
303 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id); | 304 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id); |
304 | 305 | ||
305 | if (account != null) | 306 | if (account != null) |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 56c59bd..ced2773 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -91,6 +91,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
91 | remoteClient.SendAlertMessage("Use a search string with at least 2 characters"); | 91 | remoteClient.SendAlertMessage("Use a search string with at least 2 characters"); |
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | |||
95 | m_log.DebugFormat("MAP NAME=({0})", mapName); | ||
94 | 96 | ||
95 | // try to fetch from GridServer | 97 | // try to fetch from GridServer |
96 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | 98 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); |
@@ -103,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
103 | if (info != null) | 105 | if (info != null) |
104 | regionInfos.Add(info); | 106 | regionInfos.Add(info); |
105 | } | 107 | } |
106 | else if (regionInfos.Count == 0 && mapName.StartsWith("http://")) | 108 | else if (regionInfos.Count == 0) |
107 | remoteClient.SendAlertMessage("Hyperlink could not be established."); | 109 | remoteClient.SendAlertMessage("Hyperlink could not be established."); |
108 | 110 | ||
109 | //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); | 111 | //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); |