diff options
author | Kitto Flora | 2010-11-11 04:51:05 +0000 |
---|---|---|
committer | Kitto Flora | 2010-11-11 04:51:05 +0000 |
commit | b2aeea66e36593ccab973240bab43724f577165b (patch) | |
tree | 4b7bed905081a7678411f251af260e14261cc545 /OpenSim/Region | |
parent | Fix excessive forward motion and flailing while descending a slope, prevent a... (diff) | |
parent | Prevent teleporting to a region when the egent is banned in all parcels (diff) | |
download | opensim-SC-b2aeea66e36593ccab973240bab43724f577165b.zip opensim-SC-b2aeea66e36593ccab973240bab43724f577165b.tar.gz opensim-SC-b2aeea66e36593ccab973240bab43724f577165b.tar.bz2 opensim-SC-b2aeea66e36593ccab973240bab43724f577165b.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
7 files changed, 69 insertions, 53 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 626f7eb..59968a1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -615,7 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
615 | 615 | ||
616 | // UseCircuitCode handling | 616 | // UseCircuitCode handling |
617 | if (packet.Type == PacketType.UseCircuitCode) | 617 | if (packet.Type == PacketType.UseCircuitCode) |
618 | { | 618 | { |
619 | object[] array = new object[] { buffer, packet }; | 619 | object[] array = new object[] { buffer, packet }; |
620 | 620 | ||
621 | if (m_asyncPacketHandling) | 621 | if (m_asyncPacketHandling) |
@@ -843,7 +843,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
843 | 843 | ||
844 | m_log.DebugFormat( | 844 | m_log.DebugFormat( |
845 | "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", | 845 | "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", |
846 | buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | 846 | buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); |
847 | } | 847 | } |
848 | 848 | ||
849 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) | 849 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 31eb319..6122cc2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
179 | UUID itemID = UUID.Zero; | 179 | UUID itemID = UUID.Zero; |
180 | if (sp != null) | 180 | if (sp != null) |
181 | { | 181 | { |
182 | foreach(SceneObjectGroup grp in sp.Attachments) | 182 | foreach (SceneObjectGroup grp in sp.Attachments) |
183 | { | 183 | { |
184 | if (grp.GetAttachmentPoint() == (byte)AttachmentPt) | 184 | if (grp.GetAttachmentPoint() == (byte)AttachmentPt) |
185 | { | 185 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 7f482cb..2dd444d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
61 | { | 61 | { |
62 | scene.RegisterModuleInterface<IAvatarFactory>(this); | 62 | scene.RegisterModuleInterface<IAvatarFactory>(this); |
63 | scene.EventManager.OnNewClient += NewClient; | 63 | scene.EventManager.OnNewClient += NewClient; |
64 | 64 | ||
65 | if (config != null) | 65 | if (config != null) |
66 | { | 66 | { |
67 | IConfig sconfig = config.Configs["Startup"]; | 67 | IConfig sconfig = config.Configs["Startup"]; |
@@ -138,7 +138,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
138 | 138 | ||
139 | return cached; | 139 | return cached; |
140 | } | 140 | } |
141 | |||
142 | 141 | ||
143 | /// <summary> | 142 | /// <summary> |
144 | /// Set appearance data (textureentry and slider settings) received from the client | 143 | /// Set appearance data (textureentry and slider settings) received from the client |
@@ -155,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
155 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); | 154 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); |
156 | return; | 155 | return; |
157 | } | 156 | } |
158 | 157 | ||
159 | bool changed = false; | 158 | bool changed = false; |
160 | 159 | ||
161 | // Process the texture entry | 160 | // Process the texture entry |
162 | if (textureEntry != null) | 161 | if (textureEntry != null) |
163 | { | 162 | { |
@@ -174,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
174 | }); | 173 | }); |
175 | } | 174 | } |
176 | } | 175 | } |
177 | 176 | ||
178 | // Process the visual params, this may change height as well | 177 | // Process the visual params, this may change height as well |
179 | if (visualParams != null) | 178 | if (visualParams != null) |
180 | { | 179 | { |
@@ -185,14 +184,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
185 | sp.SetHeight(sp.Appearance.AvatarHeight); | 184 | sp.SetHeight(sp.Appearance.AvatarHeight); |
186 | } | 185 | } |
187 | } | 186 | } |
188 | 187 | ||
189 | // If something changed in the appearance then queue an appearance save | 188 | // If something changed in the appearance then queue an appearance save |
190 | if (changed) | 189 | if (changed) |
191 | QueueAppearanceSave(client.AgentId); | 190 | QueueAppearanceSave(client.AgentId); |
192 | 191 | ||
193 | // And always queue up an appearance update to send out | 192 | // And always queue up an appearance update to send out |
194 | QueueAppearanceSend(client.AgentId); | 193 | QueueAppearanceSend(client.AgentId); |
195 | 194 | ||
196 | // Send the appearance back to the avatar | 195 | // Send the appearance back to the avatar |
197 | // AvatarAppearance avp = sp.Appearance; | 196 | // AvatarAppearance avp = sp.Appearance; |
198 | // sp.ControllingClient.SendAvatarDataImmediate(sp); | 197 | // sp.ControllingClient.SendAvatarDataImmediate(sp); |
@@ -216,35 +215,35 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
216 | } | 215 | } |
217 | return true; | 216 | return true; |
218 | } | 217 | } |
219 | 218 | ||
220 | #region UpdateAppearanceTimer | 219 | #region UpdateAppearanceTimer |
221 | 220 | ||
222 | public void QueueAppearanceSend(UUID agentid) | 221 | public void QueueAppearanceSend(UUID agentid) |
223 | { | 222 | { |
224 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid); | 223 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}", agentid); |
225 | 224 | ||
226 | // 100 nanoseconds (ticks) we should wait | 225 | // 100 nanoseconds (ticks) we should wait |
227 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); | 226 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); |
228 | lock (m_sendqueue) | 227 | lock (m_sendqueue) |
229 | { | 228 | { |
230 | m_sendqueue[agentid] = timestamp; | 229 | m_sendqueue[agentid] = timestamp; |
231 | m_updateTimer.Start(); | 230 | m_updateTimer.Start(); |
232 | } | 231 | } |
233 | } | 232 | } |
234 | 233 | ||
235 | public void QueueAppearanceSave(UUID agentid) | 234 | public void QueueAppearanceSave(UUID agentid) |
236 | { | 235 | { |
237 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid); | 236 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}", agentid); |
238 | 237 | ||
239 | // 100 nanoseconds (ticks) we should wait | 238 | // 100 nanoseconds (ticks) we should wait |
240 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); | 239 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); |
241 | lock (m_savequeue) | 240 | lock (m_savequeue) |
242 | { | 241 | { |
243 | m_savequeue[agentid] = timestamp; | 242 | m_savequeue[agentid] = timestamp; |
244 | m_updateTimer.Start(); | 243 | m_updateTimer.Start(); |
245 | } | 244 | } |
246 | } | 245 | } |
247 | 246 | ||
248 | private void HandleAppearanceSend(UUID agentid) | 247 | private void HandleAppearanceSend(UUID agentid) |
249 | { | 248 | { |
250 | ScenePresence sp = m_scene.GetScenePresence(agentid); | 249 | ScenePresence sp = m_scene.GetScenePresence(agentid); |
@@ -254,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
254 | return; | 253 | return; |
255 | } | 254 | } |
256 | 255 | ||
257 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); | 256 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); |
258 | 257 | ||
259 | // Send the appearance to everyone in the scene | 258 | // Send the appearance to everyone in the scene |
260 | sp.SendAppearanceToAllOtherAgents(); | 259 | sp.SendAppearanceToAllOtherAgents(); |
@@ -262,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
262 | 261 | ||
263 | // Send the appearance back to the avatar | 262 | // Send the appearance back to the avatar |
264 | // AvatarAppearance avp = sp.Appearance; | 263 | // AvatarAppearance avp = sp.Appearance; |
265 | // sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes()); | 264 | // sp.ControllingClient.SendAppearance(avp.Owner, avp.VisualParams, avp.Texture.GetBytes()); |
266 | 265 | ||
267 | /* | 266 | /* |
268 | // this needs to be fixed, the flag should be on scene presence not the region module | 267 | // this needs to be fixed, the flag should be on scene presence not the region module |
@@ -290,11 +289,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
290 | private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) | 289 | private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) |
291 | { | 290 | { |
292 | long now = DateTime.Now.Ticks; | 291 | long now = DateTime.Now.Ticks; |
293 | 292 | ||
294 | lock (m_sendqueue) | 293 | lock (m_sendqueue) |
295 | { | 294 | { |
296 | Dictionary<UUID,long> sends = new Dictionary<UUID,long>(m_sendqueue); | 295 | Dictionary<UUID, long> sends = new Dictionary<UUID, long>(m_sendqueue); |
297 | foreach (KeyValuePair<UUID,long> kvp in sends) | 296 | foreach (KeyValuePair<UUID, long> kvp in sends) |
298 | { | 297 | { |
299 | if (kvp.Value < now) | 298 | if (kvp.Value < now) |
300 | { | 299 | { |
@@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
306 | 305 | ||
307 | lock (m_savequeue) | 306 | lock (m_savequeue) |
308 | { | 307 | { |
309 | Dictionary<UUID,long> saves = new Dictionary<UUID,long>(m_savequeue); | 308 | Dictionary<UUID, long> saves = new Dictionary<UUID, long>(m_savequeue); |
310 | foreach (KeyValuePair<UUID,long> kvp in saves) | 309 | foreach (KeyValuePair<UUID, long> kvp in saves) |
311 | { | 310 | { |
312 | if (kvp.Value < now) | 311 | if (kvp.Value < now) |
313 | { | 312 | { |
@@ -320,7 +319,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
320 | if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) | 319 | if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) |
321 | m_updateTimer.Stop(); | 320 | m_updateTimer.Stop(); |
322 | } | 321 | } |
323 | 322 | ||
324 | #endregion | 323 | #endregion |
325 | 324 | ||
326 | /// <summary> | 325 | /// <summary> |
@@ -336,8 +335,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
336 | } | 335 | } |
337 | 336 | ||
338 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); | 337 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); |
339 | 338 | ||
340 | client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); | 339 | client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); |
341 | } | 340 | } |
342 | 341 | ||
343 | /// <summary> | 342 | /// <summary> |
@@ -353,17 +352,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
353 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); | 352 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); |
354 | return; | 353 | return; |
355 | } | 354 | } |
356 | 355 | ||
357 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); | 356 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}", client.AgentId); |
358 | 357 | ||
359 | AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); | 358 | AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); |
360 | 359 | ||
361 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | 360 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) |
362 | { | 361 | { |
363 | if (wear.Type < AvatarWearable.MAX_WEARABLES) | 362 | if (wear.Type < AvatarWearable.MAX_WEARABLES) |
364 | avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero); | 363 | avatAppearance.Wearables[wear.Type].Add(wear.ItemID, UUID.Zero); |
365 | } | 364 | } |
366 | 365 | ||
367 | avatAppearance.GetAssetsFrom(sp.Appearance); | 366 | avatAppearance.GetAssetsFrom(sp.Appearance); |
368 | 367 | ||
369 | // This could take awhile since it needs to pull inventory | 368 | // This could take awhile since it needs to pull inventory |
@@ -381,11 +380,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
381 | { | 380 | { |
382 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 381 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
383 | { | 382 | { |
384 | for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) | 383 | for (int j = 0; j < appearance.Wearables[j].Count; j++) |
385 | { | 384 | { |
386 | if (appearance.Wearables[i][j].ItemID == UUID.Zero) | 385 | if (appearance.Wearables[i][j].ItemID == UUID.Zero) |
387 | continue; | 386 | continue; |
388 | 387 | ||
389 | // Ignore ruth's assets | 388 | // Ignore ruth's assets |
390 | if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) | 389 | if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) |
391 | continue; | 390 | continue; |
@@ -399,9 +398,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
399 | else | 398 | else |
400 | { | 399 | { |
401 | m_log.ErrorFormat( | 400 | m_log.ErrorFormat( |
402 | "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", | 401 | "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", |
403 | appearance.Wearables[i][j].ItemID, (WearableType)i); | 402 | appearance.Wearables[i][j].ItemID, (WearableType)i); |
404 | 403 | ||
405 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); | 404 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); |
406 | } | 405 | } |
407 | } | 406 | } |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 9df13d8..ab142f7 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -1115,12 +1115,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1115 | if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) | 1115 | if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) |
1116 | flags |= RegionFlags.AllowParcelChanges; | 1116 | flags |= RegionFlags.AllowParcelChanges; |
1117 | if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) | 1117 | if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) |
1118 | flags |= (RegionFlags)(1 << 29); | 1118 | flags |= RegionFlags.BlockParcelSearch; |
1119 | 1119 | ||
1120 | if (m_scene.RegionInfo.RegionSettings.FixedSun) | 1120 | if (m_scene.RegionInfo.RegionSettings.FixedSun) |
1121 | flags |= RegionFlags.SunFixed; | 1121 | flags |= RegionFlags.SunFixed; |
1122 | if (m_scene.RegionInfo.RegionSettings.Sandbox) | 1122 | if (m_scene.RegionInfo.RegionSettings.Sandbox) |
1123 | flags |= RegionFlags.Sandbox; | 1123 | flags |= RegionFlags.Sandbox; |
1124 | if (m_scene.RegionInfo.EstateSettings.AllowVoice) | ||
1125 | flags |= RegionFlags.AllowVoice; | ||
1124 | 1126 | ||
1125 | // Fudge these to always on, so the menu options activate | 1127 | // Fudge these to always on, so the menu options activate |
1126 | // | 1128 | // |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 5bd72ee..6e0072e 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -90,7 +90,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
90 | 90 | ||
91 | // caches ExtendedLandData | 91 | // caches ExtendedLandData |
92 | private Cache parcelInfoCache; | 92 | private Cache parcelInfoCache; |
93 | private Vector3? forcedPosition = null; | 93 | private Dictionary<UUID, Vector3> forcedPosition = |
94 | new Dictionary<UUID, Vector3>(); | ||
94 | 95 | ||
95 | #region INonSharedRegionModule Members | 96 | #region INonSharedRegionModule Members |
96 | 97 | ||
@@ -185,7 +186,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
185 | void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) | 186 | void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) |
186 | { | 187 | { |
187 | //If we are forcing a position for them to go | 188 | //If we are forcing a position for them to go |
188 | if (forcedPosition != null) | 189 | if (forcedPosition.ContainsKey(remoteClient.AgentId)) |
189 | { | 190 | { |
190 | ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); | 191 | ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); |
191 | 192 | ||
@@ -195,23 +196,23 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
195 | 196 | ||
196 | 197 | ||
197 | //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines | 198 | //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines |
198 | if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2) | 199 | if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) |
199 | { | 200 | { |
200 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 201 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); |
201 | forcedPosition = null; | 202 | forcedPosition.Remove(remoteClient.AgentId); |
202 | } | 203 | } |
203 | //if we are far away, teleport | 204 | //if we are far away, teleport |
204 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) | 205 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) |
205 | { | 206 | { |
206 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 207 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); |
207 | clientAvatar.Teleport(forcedPosition.Value); | 208 | clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]); |
208 | forcedPosition = null; | 209 | forcedPosition.Remove(remoteClient.AgentId); |
209 | } | 210 | } |
210 | else | 211 | else |
211 | { | 212 | { |
212 | //Forces them toward the forced position we want if they aren't there yet | 213 | //Forces them toward the forced position we want if they aren't there yet |
213 | agentData.UseClientAgentPosition = true; | 214 | agentData.UseClientAgentPosition = true; |
214 | agentData.ClientAgentPosition = forcedPosition.Value; | 215 | agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; |
215 | } | 216 | } |
216 | } | 217 | } |
217 | } | 218 | } |
@@ -334,7 +335,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
334 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 335 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
335 | if (position.HasValue) | 336 | if (position.HasValue) |
336 | { | 337 | { |
337 | forcedPosition = position; | 338 | forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; |
338 | } | 339 | } |
339 | } | 340 | } |
340 | 341 | ||
@@ -465,7 +466,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
465 | parcel.IsBannedFromLand(clientAvatar.UUID)) | 466 | parcel.IsBannedFromLand(clientAvatar.UUID)) |
466 | { | 467 | { |
467 | //once we've sent the message once, keep going toward the target until we are done | 468 | //once we've sent the message once, keep going toward the target until we are done |
468 | if (forcedPosition == null) | 469 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) |
469 | { | 470 | { |
470 | SendYouAreBannedNotice(clientAvatar); | 471 | SendYouAreBannedNotice(clientAvatar); |
471 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | 472 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); |
@@ -474,7 +475,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
474 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) | 475 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) |
475 | { | 476 | { |
476 | //once we've sent the message once, keep going toward the target until we are done | 477 | //once we've sent the message once, keep going toward the target until we are done |
477 | if (forcedPosition == null) | 478 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) |
478 | { | 479 | { |
479 | SendYouAreRestrictedNotice(clientAvatar); | 480 | SendYouAreRestrictedNotice(clientAvatar); |
480 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | 481 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); |
@@ -483,7 +484,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
483 | else | 484 | else |
484 | { | 485 | { |
485 | //when we are finally in a safe place, lets release the forced position lock | 486 | //when we are finally in a safe place, lets release the forced position lock |
486 | forcedPosition = null; | 487 | forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); |
487 | } | 488 | } |
488 | } | 489 | } |
489 | } | 490 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ae48c02..dd06be2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -84,6 +84,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
84 | // TODO: need to figure out how allow client agents but deny | 84 | // TODO: need to figure out how allow client agents but deny |
85 | // root agents when ACL denies access to root agent | 85 | // root agents when ACL denies access to root agent |
86 | public bool m_strictAccessControl = true; | 86 | public bool m_strictAccessControl = true; |
87 | public bool m_seeIntoBannedRegion = false; | ||
87 | public int MaxUndoCount = 5; | 88 | public int MaxUndoCount = 5; |
88 | public bool LoginsDisabled = true; | 89 | public bool LoginsDisabled = true; |
89 | public bool LoadingPrims; | 90 | public bool LoadingPrims; |
@@ -683,6 +684,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
683 | } | 684 | } |
684 | 685 | ||
685 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); | 686 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); |
687 | m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion); | ||
686 | CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false); | 688 | CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false); |
687 | 689 | ||
688 | m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true); | 690 | m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true); |
@@ -3688,7 +3690,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3688 | 3690 | ||
3689 | if (m_regInfo.EstateSettings != null) | 3691 | if (m_regInfo.EstateSettings != null) |
3690 | { | 3692 | { |
3691 | if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) | 3693 | if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID)) |
3692 | { | 3694 | { |
3693 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", | 3695 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", |
3694 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); | 3696 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); |
@@ -3878,6 +3880,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
3878 | 3880 | ||
3879 | // We have to wait until the viewer contacts this region after receiving EAC. | 3881 | // We have to wait until the viewer contacts this region after receiving EAC. |
3880 | // That calls AddNewClient, which finally creates the ScenePresence | 3882 | // That calls AddNewClient, which finally creates the ScenePresence |
3883 | if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID)) | ||
3884 | { | ||
3885 | m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID); | ||
3886 | return false; | ||
3887 | } | ||
3888 | |||
3889 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); | ||
3890 | if (nearestParcel == null) | ||
3891 | { | ||
3892 | m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); | ||
3893 | return false; | ||
3894 | } | ||
3895 | |||
3881 | int num = m_sceneGraph.GetNumberOfScenePresences(); | 3896 | int num = m_sceneGraph.GetNumberOfScenePresences(); |
3882 | 3897 | ||
3883 | if (num >= RegionInfo.RegionSettings.AgentLimit) | 3898 | if (num >= RegionInfo.RegionSettings.AgentLimit) |
@@ -4878,7 +4893,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4878 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); | 4893 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); |
4879 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); | 4894 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); |
4880 | return nearestRegionEdgePoint; | 4895 | return nearestRegionEdgePoint; |
4881 | return null; | ||
4882 | } | 4896 | } |
4883 | 4897 | ||
4884 | private Vector3 GetParcelCenterAtGround(ILandObject parcel) | 4898 | private Vector3 GetParcelCenterAtGround(ILandObject parcel) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f20eb33..fd23ed2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1272,7 +1272,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1272 | 1272 | ||
1273 | m_log.DebugFormat( | 1273 | m_log.DebugFormat( |
1274 | "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", | 1274 | "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", |
1275 | client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); | 1275 | client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | /// <summary> | 1278 | /// <summary> |