From ae9c4a4d118e126b4f849bbfed112d0971459339 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 8 Nov 2010 07:48:35 -0500 Subject: Formatting cleanup. --- .../Region/ClientStack/LindenUDP/LLUDPServer.cs | 4 +- .../Avatar/Attachments/AttachmentsModule.cs | 2 +- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 63 +++++++++++----------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 4 files changed, 35 insertions(+), 36 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 821f679..b5d8ec8 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -615,7 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) - { + { object[] array = new object[] { buffer, packet }; if (m_asyncPacketHandling) @@ -843,7 +843,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_log.DebugFormat( "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", - buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); + buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); } 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 9c1154b..348b8b9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments UUID itemID = UUID.Zero; if (sp != null) { - foreach(SceneObjectGroup grp in sp.Attachments) + foreach (SceneObjectGroup grp in sp.Attachments) { if (grp.GetAttachmentPoint() == (byte)AttachmentPt) { 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 { scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += NewClient; - + if (config != null) { IConfig sconfig = config.Configs["Startup"]; @@ -138,7 +138,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return cached; } - /// /// Set appearance data (textureentry and slider settings) received from the client @@ -155,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); return; } - + bool changed = false; - + // Process the texture entry if (textureEntry != null) { @@ -174,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory }); } } - + // Process the visual params, this may change height as well if (visualParams != null) { @@ -185,14 +184,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory sp.SetHeight(sp.Appearance.AvatarHeight); } } - + // If something changed in the appearance then queue an appearance save if (changed) QueueAppearanceSave(client.AgentId); // And always queue up an appearance update to send out QueueAppearanceSend(client.AgentId); - + // Send the appearance back to the avatar // AvatarAppearance avp = sp.Appearance; // sp.ControllingClient.SendAvatarDataImmediate(sp); @@ -216,35 +215,35 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } return true; } - + #region UpdateAppearanceTimer public void QueueAppearanceSend(UUID agentid) { -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid); +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}", agentid); // 100 nanoseconds (ticks) we should wait - long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); + long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); lock (m_sendqueue) { m_sendqueue[agentid] = timestamp; m_updateTimer.Start(); } } - + public void QueueAppearanceSave(UUID agentid) { -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid); +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}", agentid); // 100 nanoseconds (ticks) we should wait - long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); + long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); lock (m_savequeue) { m_savequeue[agentid] = timestamp; m_updateTimer.Start(); } } - + private void HandleAppearanceSend(UUID agentid) { ScenePresence sp = m_scene.GetScenePresence(agentid); @@ -254,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return; } -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); // Send the appearance to everyone in the scene sp.SendAppearanceToAllOtherAgents(); @@ -262,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // Send the appearance back to the avatar // AvatarAppearance avp = sp.Appearance; - // sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes()); + // sp.ControllingClient.SendAppearance(avp.Owner, avp.VisualParams, avp.Texture.GetBytes()); /* // 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 private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) { long now = DateTime.Now.Ticks; - + lock (m_sendqueue) { - Dictionary sends = new Dictionary(m_sendqueue); - foreach (KeyValuePair kvp in sends) + Dictionary sends = new Dictionary(m_sendqueue); + foreach (KeyValuePair kvp in sends) { if (kvp.Value < now) { @@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory lock (m_savequeue) { - Dictionary saves = new Dictionary(m_savequeue); - foreach (KeyValuePair kvp in saves) + Dictionary saves = new Dictionary(m_savequeue); + foreach (KeyValuePair kvp in saves) { if (kvp.Value < now) { @@ -320,7 +319,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) m_updateTimer.Stop(); } - + #endregion /// @@ -336,8 +335,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); - - client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); + + client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); } /// @@ -353,17 +352,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); return; } - -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); + +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}", client.AgentId); AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { if (wear.Type < AvatarWearable.MAX_WEARABLES) - avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero); + avatAppearance.Wearables[wear.Type].Add(wear.ItemID, UUID.Zero); } - + avatAppearance.GetAssetsFrom(sp.Appearance); // This could take awhile since it needs to pull inventory @@ -381,11 +380,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) { - for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) + for (int j = 0; j < appearance.Wearables[j].Count; j++) { if (appearance.Wearables[i][j].ItemID == UUID.Zero) continue; - + // Ignore ruth's assets if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) continue; @@ -399,9 +398,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory else { m_log.ErrorFormat( - "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", + "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", appearance.Wearables[i][j].ItemID, (WearableType)i); - + appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 964f8cb..34d1c39 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat( "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", - client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); + client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); } /// -- cgit v1.1 From dfe11566f43a60aaf0dda466a9425d8a1cc1d2e4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 20:18:36 +0100 Subject: Fix parcel bans to work only on the avatars they're supposed to work on instead of pushing all avatars, even the ones that are allowed. --- .../CoreModules/World/Land/LandManagementModule.cs | 29 +++++++++++----------- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region') 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 // caches ExtendedLandData private Cache parcelInfoCache; - private Vector3? forcedPosition = null; + private Dictionary forcedPosition = + new Dictionary(); #region INonSharedRegionModule Members @@ -185,7 +186,7 @@ namespace OpenSim.Region.CoreModules.World.Land void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) { //If we are forcing a position for them to go - if (forcedPosition != null) + if (forcedPosition.ContainsKey(remoteClient.AgentId)) { ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); @@ -195,23 +196,23 @@ namespace OpenSim.Region.CoreModules.World.Land //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines - if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2) + if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) { - Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); - forcedPosition = null; + Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); + forcedPosition.Remove(remoteClient.AgentId); } //if we are far away, teleport - else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) + else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) { - Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); - clientAvatar.Teleport(forcedPosition.Value); - forcedPosition = null; + Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); + clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]); + forcedPosition.Remove(remoteClient.AgentId); } else { //Forces them toward the forced position we want if they aren't there yet agentData.UseClientAgentPosition = true; - agentData.ClientAgentPosition = forcedPosition.Value; + agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; } } } @@ -334,7 +335,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (m_scene.Permissions.IsGod(avatar.UUID)) return; if (position.HasValue) { - forcedPosition = position; + forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; } } @@ -465,7 +466,7 @@ namespace OpenSim.Region.CoreModules.World.Land parcel.IsBannedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done - if (forcedPosition == null) + if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) { SendYouAreBannedNotice(clientAvatar); ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); @@ -474,7 +475,7 @@ namespace OpenSim.Region.CoreModules.World.Land else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done - if (forcedPosition == null) + if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) { SendYouAreRestrictedNotice(clientAvatar); ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); @@ -483,7 +484,7 @@ namespace OpenSim.Region.CoreModules.World.Land else { //when we are finally in a safe place, lets release the forced position lock - forcedPosition = null; + forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); } } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ae48c02..b6d9a02 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4878,7 +4878,6 @@ namespace OpenSim.Region.Framework.Scenes Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); return nearestRegionEdgePoint; - return null; } private Vector3 GetParcelCenterAtGround(ILandObject parcel) -- cgit v1.1 From d206721e2f8833f6c95fa9fda350f0187c24d34f Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 22:41:40 +0100 Subject: Add option SeeIntoBannedRegion to allow band to act like SL, where you can see in but not enter. Defaults to false, so no change. --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b6d9a02..a449cca 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -84,6 +84,7 @@ namespace OpenSim.Region.Framework.Scenes // TODO: need to figure out how allow client agents but deny // root agents when ACL denies access to root agent public bool m_strictAccessControl = true; + public bool m_seeIntoBannedRegion = false; public int MaxUndoCount = 5; public bool LoginsDisabled = true; public bool LoadingPrims; @@ -683,6 +684,7 @@ namespace OpenSim.Region.Framework.Scenes } m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); + m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion); CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false); m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true); @@ -3688,7 +3690,7 @@ namespace OpenSim.Region.Framework.Scenes if (m_regInfo.EstateSettings != null) { - if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) + if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID)) { m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); @@ -3878,6 +3880,12 @@ namespace OpenSim.Region.Framework.Scenes // We have to wait until the viewer contacts this region after receiving EAC. // That calls AddNewClient, which finally creates the ScenePresence + if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID)) + { + m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID); + return false; + } + int num = m_sceneGraph.GetNumberOfScenePresences(); if (num >= RegionInfo.RegionSettings.AgentLimit) -- cgit v1.1 From 22144eb8f74207fedb1042cbcf9f7ade3e2eca59 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 20:18:36 +0100 Subject: Fix parcel bans to work only on the avatars they're supposed to work on instead of pushing all avatars, even the ones that are allowed. --- .../CoreModules/World/Land/LandManagementModule.cs | 29 +++++++++++----------- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 634685a..695202f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -88,7 +88,8 @@ namespace OpenSim.Region.CoreModules.World.Land // caches ExtendedLandData private Cache parcelInfoCache; - private Vector3? forcedPosition = null; + private Dictionary forcedPosition = + new Dictionary(); #region INonSharedRegionModule Members @@ -177,7 +178,7 @@ namespace OpenSim.Region.CoreModules.World.Land void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) { //If we are forcing a position for them to go - if (forcedPosition != null) + if (forcedPosition.ContainsKey(remoteClient.AgentId)) { ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); @@ -187,23 +188,23 @@ namespace OpenSim.Region.CoreModules.World.Land //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines - if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2) + if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) { - Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); - forcedPosition = null; + Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); + forcedPosition.Remove(remoteClient.AgentId); } //if we are far away, teleport - else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) + else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) { - Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); - clientAvatar.Teleport(forcedPosition.Value); - forcedPosition = null; + Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); + clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]); + forcedPosition.Remove(remoteClient.AgentId); } else { //Forces them toward the forced position we want if they aren't there yet agentData.UseClientAgentPosition = true; - agentData.ClientAgentPosition = forcedPosition.Value; + agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; } } } @@ -326,7 +327,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (m_scene.Permissions.IsGod(avatar.UUID)) return; if (position.HasValue) { - forcedPosition = position; + forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; } } @@ -457,7 +458,7 @@ namespace OpenSim.Region.CoreModules.World.Land parcel.IsBannedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done - if (forcedPosition == null) + if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) { SendYouAreBannedNotice(clientAvatar); ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); @@ -466,7 +467,7 @@ namespace OpenSim.Region.CoreModules.World.Land else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done - if (forcedPosition == null) + if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) { SendYouAreRestrictedNotice(clientAvatar); ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); @@ -475,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Land else { //when we are finally in a safe place, lets release the forced position lock - forcedPosition = null; + forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); } } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 94a773d..c5396d5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4740,7 +4740,6 @@ namespace OpenSim.Region.Framework.Scenes Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); return nearestRegionEdgePoint; - return null; } private Vector3 GetParcelCenterAtGround(ILandObject parcel) -- cgit v1.1 From fa64f2e56e6f3375c1417172b134eacb1a00f16c Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 23:54:08 +0000 Subject: Although the Allow Voice setting is per estate rather than per region, apparently it is required in the region handshake to let the client enable parcel voice controls. So, send it. --- OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') 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 if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) flags |= RegionFlags.AllowParcelChanges; if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) - flags |= (RegionFlags)(1 << 29); + flags |= RegionFlags.BlockParcelSearch; if (m_scene.RegionInfo.RegionSettings.FixedSun) flags |= RegionFlags.SunFixed; if (m_scene.RegionInfo.RegionSettings.Sandbox) flags |= RegionFlags.Sandbox; + if (m_scene.RegionInfo.EstateSettings.AllowVoice) + flags |= RegionFlags.AllowVoice; // Fudge these to always on, so the menu options activate // -- cgit v1.1 From aace455249b2ea8c033871f39f23409119760932 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 10 Nov 2010 16:22:55 +0100 Subject: Prevent teleporting to a region when the egent is banned in all parcels --- OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a449cca..dd06be2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3886,6 +3886,13 @@ namespace OpenSim.Region.Framework.Scenes return false; } + ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); + if (nearestParcel == null) + { + m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); + return false; + } + int num = m_sceneGraph.GetNumberOfScenePresences(); if (num >= RegionInfo.RegionSettings.AgentLimit) -- cgit v1.1