diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index c6e05b1f6a..d7ea906d8c 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs @@ -36,6 +36,7 @@ using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Framework.Monitoring; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; @@ -656,12 +657,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC public void Process() { - httpThread = new Thread(SendRequest); - httpThread.Name = "HttpRequestThread"; - httpThread.Priority = ThreadPriority.BelowNormal; - httpThread.IsBackground = true; _finished = false; - httpThread.Start(); + Watchdog.StartThread(SendRequest, "HttpRequestThread", ThreadPriority.BelowNormal, true, false); } /* @@ -733,6 +730,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC } _finished = true; + + Watchdog.RemoveThread(); } public void Stop() diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 18376c317e..5f0dbd7497 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -224,6 +224,12 @@ namespace OpenSim.Region.Framework.Scenes public bool m_clampPrimSize; public bool m_trustBinaries; public bool m_allowScriptCrossings = true; + + /// + /// Can avatars cross from and to this region? + /// + public bool AllowAvatarCrossing { get; set; } + public bool m_useFlySlow; public bool m_useTrashOnDelete = true; @@ -1023,6 +1029,12 @@ namespace OpenSim.Region.Framework.Scenes #endregion Region Config + IConfig entityTransferConfig = m_config.Configs["EntityTransfer"]; + if (entityTransferConfig != null) + { + AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing); + } + #region Interest Management IConfig interestConfig = m_config.Configs["InterestManagement"]; @@ -1091,6 +1103,8 @@ namespace OpenSim.Region.Framework.Scenes CollidablePrims = true; PhysicsEnabled = true; + AllowAvatarCrossing = true; + PeriodicBackup = true; UseBackup = true; @@ -5613,6 +5627,9 @@ namespace OpenSim.Region.Framework.Scenes return true; } + if (!AllowAvatarCrossing && !viaTeleport) + return false; + // FIXME: Root agent count is currently known to be inaccurate. This forces a recount before we check. // However, the long term fix is to make sure root agent count is always accurate. m_sceneGraph.RecalculateStats(); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e0b76407c7..3c37de84ec 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -608,8 +608,11 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Current velocity of the avatar. + /// Velocity of the avatar with respect to its local reference frame. /// + /// + /// So when sat on a vehicle this will be 0. To get velocity with respect to the world use GetWorldVelocity() + /// public override Vector3 Velocity { get @@ -622,10 +625,10 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", // m_velocity, Name, Scene.RegionInfo.RegionName); } - else if (ParentPart != null) - { - return ParentPart.ParentGroup.Velocity; - } +// else if (ParentPart != null) +// { +// return ParentPart.ParentGroup.Velocity; +// } return m_velocity; } @@ -749,25 +752,32 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Gets the world rotation of this presence. + /// Get rotation relative to the world. /// - /// - /// Unlike Rotation, this returns the world rotation no matter whether the avatar is sitting on a prim or not. - /// /// public Quaternion GetWorldRotation() { - if (IsSatOnObject) - { - SceneObjectPart sitPart = ParentPart; + SceneObjectPart sitPart = ParentPart; - if (sitPart != null) - return sitPart.GetWorldRotation() * Rotation; - } + if (sitPart != null) + return sitPart.GetWorldRotation() * Rotation; return Rotation; } + /// + /// Get velocity relative to the world. + /// + public Vector3 GetWorldVelocity() + { + SceneObjectPart sitPart = ParentPart; + + if (sitPart != null) + return sitPart.ParentGroup.Velocity; + + return Velocity; + } + public void AdjustKnownSeeds() { Dictionary seeds; @@ -3216,7 +3226,8 @@ namespace OpenSim.Region.Framework.Scenes m_lastVelocity = Velocity; } - CheckForBorderCrossing(); + if (Scene.AllowAvatarCrossing) + CheckForBorderCrossing(); CheckForSignificantMovement(); // sends update to the modules. } diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index f5bd44db5f..bdd07e0a99 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs @@ -109,10 +109,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat internal int m_resetk = 0; - // Working threads - - private Thread m_listener = null; - private Object msyncConnect = new Object(); internal bool m_randomizeNick = true; // add random suffix @@ -363,10 +359,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat m_log.InfoFormat("[IRC-Connector-{0}]: Connected to {1}:{2}", idn, m_server, m_port); - m_listener = new Thread(new ThreadStart(ListenerRun)); - m_listener.Name = "IRCConnectorListenerThread"; - m_listener.IsBackground = true; - m_listener.Start(); + Watchdog.StartThread(ListenerRun, "IRCConnectionListenerThread", ThreadPriority.Normal, true, false); // This is the message order recommended by RFC 2812 if (m_password != null) @@ -510,21 +503,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat { while (m_enabled && m_connected) { - if ((inputLine = m_reader.ReadLine()) == null) throw new Exception("Listener input socket closed"); + Watchdog.UpdateThread(); + // m_log.Info("[IRCConnector]: " + inputLine); if (inputLine.Contains("PRIVMSG")) { - Dictionary data = ExtractMsg(inputLine); // Any chat ??? if (data != null) { - OSChatMessage c = new OSChatMessage(); c.Message = data["msg"]; c.Type = ChatTypeEnum.Region; @@ -540,9 +532,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat c.Message = String.Format("/me {0}", c.Message.Substring(8, c.Message.Length - 9)); ChannelState.OSChat(this, c, false); - } - } else { @@ -562,6 +552,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat if (m_enabled && (m_resetk == resetk)) Reconnect(); + + Watchdog.RemoveThread(); } private Regex RE = new Regex(@":(?[\w-]*)!(?\S*) PRIVMSG (?\S+) :(?.*)", diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index f7317c01fe..a46c241db3 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -32,6 +32,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Threading; using OpenSim.Framework; +using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; using Logging = OpenSim.Region.CoreModules.Framework.Statistics.Logging; @@ -286,9 +287,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters if (BSParam.UseSeparatePhysicsThread) { // The physics simulation should happen independently of the heartbeat loop - m_physicsThread = new Thread(BulletSPluginPhysicsThread); - m_physicsThread.Name = BulletEngineName; - m_physicsThread.Start(); + m_physicsThread + = Watchdog.StartThread( + BulletSPluginPhysicsThread, + string.Format("{0} ({1})", BulletEngineName, RegionName), + ThreadPriority.Normal, + true, + true); } } @@ -856,7 +861,11 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters // TODO. DetailLog("{0},BulletSPluginPhysicsThread,longerThanRealtime={1}", BSScene.DetailLogZero, simulationTimeVsRealtimeDifferenceMS); } + + Watchdog.UpdateThread(); } + + Watchdog.RemoveThread(); } #endregion // Simulation diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5d7fc9db0d..7c384b268f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2560,7 +2560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_host.ParentGroup.IsAttachment) { ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar); - vel = avatar.Velocity; + vel = avatar.GetWorldVelocity(); } else { @@ -11221,7 +11221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ret.Add(new LSL_Rotation(av.GetWorldRotation())); break; case ScriptBaseClass.OBJECT_VELOCITY: - ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); + ret.Add(new LSL_Vector(av.GetWorldVelocity())); break; case ScriptBaseClass.OBJECT_OWNER: ret.Add(new LSL_String(id)); @@ -11342,7 +11342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar); if (sp != null) - vel = sp.Velocity; + vel = sp.GetWorldVelocity(); } else { diff --git a/OpenSim/Region/UserStatistics/SimStatsAJAX.cs b/OpenSim/Region/UserStatistics/SimStatsAJAX.cs index ad848a1330..06d9e91449 100644 --- a/OpenSim/Region/UserStatistics/SimStatsAJAX.cs +++ b/OpenSim/Region/UserStatistics/SimStatsAJAX.cs @@ -162,9 +162,6 @@ namespace OpenSim.Region.UserStatistics output.Append("OthrMS"); HTMLUtil.TD_C(ref output); HTMLUtil.TD_O(ref output, TDHeaderClass); - output.Append("ScrLPS"); - HTMLUtil.TD_C(ref output); - HTMLUtil.TD_O(ref output, TDHeaderClass); output.Append("OutPPS"); HTMLUtil.TD_C(ref output); HTMLUtil.TD_O(ref output, TDHeaderClass); @@ -194,9 +191,6 @@ namespace OpenSim.Region.UserStatistics output.Append(sdata.OtherFrameTime); HTMLUtil.TD_C(ref output); HTMLUtil.TD_O(ref output, TDDataClassCenter); - output.Append(sdata.ScriptLinesPerSecond); - HTMLUtil.TD_C(ref output); - HTMLUtil.TD_O(ref output, TDDataClassCenter); output.Append(sdata.OutPacketsPerSecond); HTMLUtil.TD_C(ref output); HTMLUtil.TD_O(ref output, TDDataClassCenter); diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index e67ecf05fa..27376cc69d 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -227,7 +227,7 @@ namespace OpenSim.Services.LLLoginService public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, GridRegion destination, List invSkel, FriendInfo[] friendsList, ILibraryService libService, string where, string startlocation, Vector3 position, Vector3 lookAt, List gestures, string message, - GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, + GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee) : this() { diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 0ad9f9284a..80596525d1 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -77,8 +77,6 @@ namespace OpenSim.Services.LLLoginService protected string m_GatekeeperURL; protected bool m_AllowRemoteSetLoginLevel; protected string m_MapTileURL; - protected string m_ProfileURL; - protected string m_OpenIDURL; protected string m_SearchURL; protected string m_Currency; protected string m_ClassifiedFee; @@ -119,8 +117,6 @@ namespace OpenSim.Services.LLLoginService m_GatekeeperURL = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); - m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); - m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); @@ -498,7 +494,7 @@ namespace OpenSim.Services.LLLoginService = new LLLoginResponse( account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, - m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, + m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj b/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj deleted file mode 100644 index 4625c330e0..0000000000 --- a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj +++ /dev/null @@ -1,97 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {595D67F3-B413-4A43-8568-5B5930E3B31D} - Exe - Properties - OpenSim._32BitLaunch - OpenSim.32BitLaunch - v4.0 - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - ..\..\..\bin\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - False - .exe - ..\..\..\bin\OpenSim.exe - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj deleted file mode 100644 index 9618c08500..0000000000 --- a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {595D67F3-B413-4A43-8568-5B5930E3B31D} - Exe - Properties - Robust._32BitLaunch - Robust.32BitLaunch - v4.0 - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - ..\..\..\bin\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\bin\log4net.dll - - - False - ..\..\..\bin\Robust.exe - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 2cd32c686c..5361e8d100 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -711,6 +711,9 @@ ; max_distance = 65535 + ; Allow avatars to cross into and out of the region. + AllowAvatarCrossing = true + ; Minimum user level required for HyperGrid teleports LevelHGTeleport = 0 diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 684c019175..edcbec3a74 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -372,16 +372,6 @@ HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:Asset ; Url to search service ; SearchURL = "http://127.0.0.1:8002/"; - ; For V2/3 Web Profiles - ; Work in progress: The ProfileServerURL/OpenIDServerURL are - ; being used in a development viewer as support for webprofiles - ; is being developed across the componets - ; - ; ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]" - ; - ; For V2/V3 webapp authentication SSO - ; OpenIDServerURL = "http://127.0.0.1/openid/openidserver/" - ; For V3 destination guide ; DestinationGuide = "http://127.0.0.1/guide" diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index eafab64c4a..6686c3f7a2 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -331,16 +331,6 @@ MapGetServiceConnector = "8002/OpenSim.Server.Handlers.dll:MapGetServiceConnecto ; Url to search service ; SearchURL = "http://127.0.0.1:8002/"; - ; For V2/3 Web Profiles - ; Work in progress: The ProfileServerURL/OpenIDServerURL are - ; being used in a development viewer as support for webprofiles - ; is being developed across the componets - ; - ; ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]" - ; - ; For V2/V3 webapp authentication SSO - ; OpenIDServerURL = "http://127.0.0.1/openid/openidserver/" - ; For V3 destination guide ; DestinationGuide = "http://127.0.0.1/guide" diff --git a/prebuild.xml b/prebuild.xml index 006f545fd4..ba18a2c50f 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1746,6 +1746,7 @@ + diff --git a/bin/OpenSim.32BitLaunch.exe b/share/32BitLaunch/OpenSim.32BitLaunch.exe similarity index 100% rename from bin/OpenSim.32BitLaunch.exe rename to share/32BitLaunch/OpenSim.32BitLaunch.exe diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs b/share/32BitLaunch/OpenSim.32BitLaunch/Program.cs similarity index 100% rename from OpenSim/Tools/OpenSim.32BitLaunch/Program.cs rename to share/32BitLaunch/OpenSim.32BitLaunch/Program.cs diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs b/share/32BitLaunch/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs similarity index 100% rename from OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs rename to share/32BitLaunch/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs diff --git a/share/32BitLaunch/README b/share/32BitLaunch/README new file mode 100644 index 0000000000..443cde0ab9 --- /dev/null +++ b/share/32BitLaunch/README @@ -0,0 +1,5 @@ +Many issues appear in the support channels because of a misunderstanding of the use of these utilities. And through discussion at OpenSimulator Office Hours it was determined that these tools probably serve no useful purpose anymore. + +Instead of removing them immediately, we move them here, for a time, in case there is a useful purpose that has escaped us during conversations. + +If a need to compile these arises, the OpenSim.32BitLaunch and Robust.32BitLaunch directories may be placed under the ./OpenSim/Tools sources subdirectory, run the prebuild script and compile. diff --git a/bin/Robust.32BitLaunch.exe b/share/32BitLaunch/Robust.32BitLaunch.exe similarity index 100% rename from bin/Robust.32BitLaunch.exe rename to share/32BitLaunch/Robust.32BitLaunch.exe diff --git a/OpenSim/Tools/Robust.32BitLaunch/Program.cs b/share/32BitLaunch/Robust.32BitLaunch/Program.cs similarity index 100% rename from OpenSim/Tools/Robust.32BitLaunch/Program.cs rename to share/32BitLaunch/Robust.32BitLaunch/Program.cs diff --git a/OpenSim/Tools/Robust.32BitLaunch/Properties/AssemblyInfo.cs b/share/32BitLaunch/Robust.32BitLaunch/Properties/AssemblyInfo.cs similarity index 100% rename from OpenSim/Tools/Robust.32BitLaunch/Properties/AssemblyInfo.cs rename to share/32BitLaunch/Robust.32BitLaunch/Properties/AssemblyInfo.cs diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln b/share/32BitLaunch/Robust.32BitLaunch/Robust.32BitLaunch.sln similarity index 100% rename from OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln rename to share/32BitLaunch/Robust.32BitLaunch/Robust.32BitLaunch.sln