From ed01e9162d1ae0a39b4fcf7e238c975efddfc95b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Fri, 18 Jun 2010 23:07:51 +0100 Subject: [PATCH 01/15] Change Opensim.Servers.exe comment at top of Robust.HG.ini to Robust.exe This addresses http://opensimulator.org/mantis/view.php?id=4772 Thanks to aiaustin for pointing this out --- bin/Robust.HG.ini.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 9830d389af..39228eb1d6 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -1,7 +1,7 @@ ;; Configurations for enabling HG1.5 ;; ;; Run -;; $ OpenSim.Server.exe -inifile OpenSim.Server.HG.ini +;; $ Robust.exe -inifile Robust.HG.ini ;; HG1.5 handlers are: OpenSim.Server.Handlers.dll:GatekeeperService ;; OpenSim.Server.Handlers.dll:UserAgentService From de84da9e7b794433dc8ada0767f51c28f5d9efc0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 23:20:32 +0100 Subject: [PATCH 02/15] eliminate SimianGrid [Groups] section from GridCommon.ini.example as per Nebadon this is only used by SimianGrid and is now in SimianGrid.ini --- bin/config-include/GridCommon.ini.example | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 88ac5e2dbf..a19591bfaa 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -8,7 +8,6 @@ ; AssetServerURI = "http://myassetserver.com:8003" - [InventoryService] ; ; change this to your grid-wide inventory server @@ -58,13 +57,6 @@ ; FriendsServerURI = "http://mygridserver.com:8003" -[Groups] - ; - ; change this to your grid-wide groups server - ; - GroupsServerURI = "http://mygridserver.com:82/Grid/" - - [Modules] ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. ;; Copy the config .example file into your own .ini file and change configs there From 514732595bdeb75a94a232b2f49ad11684ff7f6f Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 23:38:40 +0100 Subject: [PATCH 03/15] minor: try and make the explanations for the AllowScriptCrossing and TrustBinaries settings in OpenSim.ini.example clearer --- bin/OpenSim.ini.example | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 0bc3d87833..aab1a58754 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -80,14 +80,16 @@ PhysicalPrimMax = 10 ; (I think this was moved to the Regions.ini!) ClampPrimSize = false - ; Region crossing + ; Allow scripts to cross region boundaries. These are recompiled on the new region. AllowScriptCrossing = false + + ; Allow compiled script binary code to cross region boundaries. ; If you set this to "true", any region that can teleport to you can ; inject ARBITRARY BINARY CODE into your system. Use at your own risk. ; YOU HAVE BEEN WARNED!!! TrustBinaries = false - ; Combine all contiguous regions into one large region + ; Combine all contiguous regions into one large megaregion ; Order your regions from South to North, West to East in your regions.ini and then set this to true ; Warning! Don't use this with regions that have existing content!, This will likely break them CombineContiguousRegions = false From 8fc3745e1905c9c8881eac9c09da9754e4fa8265 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Jun 2010 01:23:52 +0100 Subject: [PATCH 04/15] Overhaul basic README.txt for new estate setup options on first run. Also make some minor changes for clarity. --- README.txt | 58 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/README.txt b/README.txt index e19e58ecad..190fc46d35 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,8 @@ Welcome to OpenSim! +================ === OVERVIEW === +================ OpenSim is a BSD Licensed Open Source project to develop a functioning virtual worlds server platform capable of supporting multiple clients @@ -10,16 +12,19 @@ C#, and can run under Mono or the Microsoft .NET runtimes. This is considered an alpha release. Some stuff works, a lot doesn't. If it breaks, you get to keep *both* pieces. +========================= === Compiling OpenSim === +========================= Please see BUILDING.txt if you downloaded a source distribution and need to build OpenSim before running it. +================================== === Running OpenSim on Windows === +================================== We recommend that you run OpenSim from a command prompt on Windows in order -to capture any errors, though you can also run it by double-clicking -bin/OpenSim.exe +to capture any errors. To run OpenSim from a command prompt @@ -28,7 +33,9 @@ To run OpenSim from a command prompt Now see the "Configuring OpenSim" section +================================ === Running OpenSim on Linux === +================================ You will need Mono >= 2.4.2 to run OpenSim. On some Linux distributions you may need to install additional packages. See http://opensimulator.org/wiki/Dependencies @@ -37,48 +44,64 @@ for more information. To run OpenSim, from the unpacked distribution type: * cd bin - * mono ./OpenSim.exe + * mono OpenSim.exe Now see the "Configuring OpenSim" section +=========================== === Configuring OpenSim === +=========================== When OpenSim starts for the first time, you will be prompted with a series of questions that look something like: [09-17 03:54:40] DEFAULT REGION CONFIG: Simulator Name [OpenSim Test]: -At each of these you must provide you own value or just hit enter to -take the default (in this case "OpenSim Test"). +For all the options except simulator name, you can safely hit enter to accept +the default if you want to connect using a client on the same machine or over +your local network. -YOUR SIM WILL NOT BE STARTED UNTIL YOU ANSWER ALL QUESTIONS +You will then be asked "Do you wish to join an existing estate?". If you're +starting OpenSim for the first time then answer no (which is the default) and +provide an estate name. + +Shortly afterwards, you will then be asked to enter an estate owner first name, +last name, password and e-mail (which can be left blank). Do not forget these +details, since initially only this account will be able to manage your region +in-world. You can also use these details to perform your first login. Once you are presented with a prompt that looks like: - Region# : + Region (My region name) # You have successfully started OpenSim. -Before you can log in you will need to create a user account if you didn't already create -your user as the "Master Avatar" during the region configuration stage. You can do -this by running the "create user" command on the OpenSim console. This will -ask you a series of questions such as first name, last name and password. +If you want to create another user account to login rather than the estate +account, then type "craete user" on the OpenSim console and follow the prompts. Helpful resources: * http://opensimulator.org/wiki/Configuration * http://opensimulator.org/wiki/Configuring_Regions * http://opensimulator.org/wiki/Mysql-config +================================== === Connecting to your OpenSim === +================================== -By default your sim will be running on http://127.0.0.1:9000. To use -your OpenSim add -loginuri http://127.0.0.1:9000 to your second life -client (running on the same machine as your OpenSim). To login, use the -same avatar details that you gave to the "create user" console command. +By default your sim will be available for login on port 9000. You can login by +adding -loginuri http://127.0.0.1:9000 to the command that starts Second Life +(e.g. in the Target: box of the client icon properties on Windows). You can +also login using the network IP address of the machine running OpenSim (e.g. +http://192.168.1.2:9000) +To login, use the avatar details that you gave for your estate ownership or the +one you set up using the "create user" command. + +=================== === Bug reports === +=================== -In the likely event of bugs biting you (err, your OpenSim) we +In the very likely event of bugs biting you (err, your OpenSim) we encourage you to see whether the problem has already been reported on the OpenSim mantis system. You can find the OpenSim mantis system at @@ -97,11 +120,12 @@ mantis"). Useful information to include: mono --debug OpenSim.exe +=================================== === More Information on OpenSim === +=================================== More extensive information on building, running, and configuring OpenSim, as well as how to report bugs, and participate in the OpenSim project can always be found at http://opensimulator.org. Thanks for trying OpenSim, we hope it is a pleasant experience. - \ No newline at end of file From ad62ca6babaf1e4c0e1e8aa384d87d26dee7c7bf Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Jun 2010 01:27:46 +0100 Subject: [PATCH 05/15] minor: correct a spelling mistake --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 190fc46d35..14109bea1c 100644 --- a/README.txt +++ b/README.txt @@ -77,7 +77,7 @@ Once you are presented with a prompt that looks like: You have successfully started OpenSim. If you want to create another user account to login rather than the estate -account, then type "craete user" on the OpenSim console and follow the prompts. +account, then type "create user" on the OpenSim console and follow the prompts. Helpful resources: * http://opensimulator.org/wiki/Configuration From 954906f0bdc3ff395cd567281e22b5608b805aac Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Jun 2010 01:52:13 +0100 Subject: [PATCH 06/15] remove link to wiki mysql-config since the page was out-of-date and actively misleading --- README.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/README.txt b/README.txt index 14109bea1c..18784be11d 100644 --- a/README.txt +++ b/README.txt @@ -82,7 +82,6 @@ account, then type "create user" on the OpenSim console and follow the prompts. Helpful resources: * http://opensimulator.org/wiki/Configuration * http://opensimulator.org/wiki/Configuring_Regions - * http://opensimulator.org/wiki/Mysql-config ================================== === Connecting to your OpenSim === From db046f1fbacf3b41b145f965cc1861df04d7aa6f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 08:51:07 -0700 Subject: [PATCH 07/15] Reinstated the behavior of AddPrimShape as it was as of December. Trying to fix mantis #4777 --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 100f98dc39..7fd59a0ebf 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1781,6 +1781,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); m_log.Debug(e.ToString()); mesh = null; + return null; } } From f0f684161eaf7481076cff63e794e01f654d627c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 08:51:07 -0700 Subject: [PATCH 08/15] Reinstated the behavior of AddPrimShape *exactly* as it was as of December. Trying to fix mantis #4777 --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 100f98dc39..f84c5053c9 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1772,16 +1772,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (needsMeshing(pbs)) { - try - { - mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); - } - catch(Exception e) - { - m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); - m_log.Debug(e.ToString()); - mesh = null; - } + mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); } result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); From 9b410f5e94b2969fbd1004560eae567d1c950666 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 09:25:36 -0700 Subject: [PATCH 09/15] Reverting my last two commits, putting back Melanie's exception handler. Doesn't solve #4777. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index f84c5053c9..100f98dc39 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1772,7 +1772,16 @@ namespace OpenSim.Region.Physics.OdePlugin if (needsMeshing(pbs)) { - mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + try + { + mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + } + catch(Exception e) + { + m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); + m_log.Debug(e.ToString()); + mesh = null; + } } result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); From 1e7ce6dbced67350214f921566f39a3d1413e9bb Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 09:44:02 -0700 Subject: [PATCH 10/15] Hunting for the problem in #4777 --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++++ OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 1 + 2 files changed, 5 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 38b2dc2f68..59fd805bb3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1487,6 +1487,10 @@ namespace OpenSim.Region.Framework.Scenes DoPhysicsPropertyUpdate(RigidBody, true); PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); } + else + { + m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); + } } } } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 100f98dc39..7fd59a0ebf 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1781,6 +1781,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); m_log.Debug(e.ToString()); mesh = null; + return null; } } From 24a68e36fb07e4366c8f9f680bcbbf85ac92b2f3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 12:32:36 -0700 Subject: [PATCH 11/15] Bug fix: wrong name of requester in local friendship offer. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 80982fd577..5552be7648 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -503,7 +503,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends UUID principalID = new UUID(im.fromAgentID); UUID friendID = new UUID(im.toAgentID); - m_log.DebugFormat("[FRIENDS]: {0} offered friendship to {1}", principalID, friendID); + m_log.DebugFormat("[FRIENDS]: {0} ({1}) offered friendship to {2}", principalID, im.fromAgentName, friendID); // This user wants to be friends with the other user. // Let's add the relation backwards, in case the other is not online @@ -521,6 +521,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends im.imSessionID = im.fromAgentID; // Try the local sim + UserAccount account = UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, agentID); + im.fromAgentName = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName; + if (LocalFriendshipOffered(friendID, im)) return; From 76b59b8df776121708b7ff93312c25c341b19ea6 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 20 Jun 2010 06:23:08 +0200 Subject: [PATCH 12/15] Make dataserver() return a 0 when agent id offline, instead of a timeout --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 61c5add77c..5c6d382a0a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4232,22 +4232,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID uuid = (UUID)id; UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); + if (account == null) + return UUID.Zero.ToString(); + PresenceInfo pinfo = null; PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); if (pinfos != null && pinfos.Length > 0) pinfo = pinfos[0]; - if (pinfo == null) - return UUID.Zero.ToString(); - string reply = String.Empty; switch (data) { case 1: // DATA_ONLINE (0|1) - // TODO: implement fetching of this information - if (pinfo != null) + if (pinfo != null && pinfo.RegionID != UUID.Zero) reply = "1"; else reply = "0"; From 95c763201f6f777557bc1c88e4bcbfbfd0aeebda Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 20 Jun 2010 06:36:46 +0200 Subject: [PATCH 13/15] Set the offline flag in inventory offers --- .../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 2f1e9dd74e..0d04491a9f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -241,6 +241,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer im.imSessionID = itemID.Guid; } + im.offline = 1; // Remember these + // Send the IM to the recipient. The item is already // in their inventory, so it will not be lost if // they are offline. From 797767da57be98da24bd91b61eb5b35fc242bb3c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 20 Jun 2010 07:16:19 +0200 Subject: [PATCH 14/15] Insert a space after the comma on the ToString methos of lsl vectors and rotations to match SL. --- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 1ea52c5c4e..212dbe3a1b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -83,19 +83,19 @@ namespace OpenSim.Region.ScriptEngine.Shared public override string ToString() { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z); + string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", x, y, z); return s; } public static explicit operator LSLString(Vector3 vec) { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); + string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z); return new LSLString(s); } public static explicit operator string(Vector3 vec) { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); + string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z); return s; } @@ -337,19 +337,19 @@ namespace OpenSim.Region.ScriptEngine.Shared public override string ToString() { - string st=String.Format(Culture.FormatProvider, "<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s); + string st=String.Format(Culture.FormatProvider, "<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", x, y, z, s); return st; } public static explicit operator string(Quaternion r) { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); + string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s); return s; } public static explicit operator LSLString(Quaternion r) { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); + string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s); return new LSLString(s); } From 13a0b65a804349e41b8e692727068ac6580c0d35 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 20 Jun 2010 21:38:06 +0200 Subject: [PATCH 15/15] Modify avatar responsiveness policy to send roots before children --- OpenSim/Region/Framework/Scenes/Prioritizer.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 7b7677bd6b..b95b5f243f 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -208,12 +208,19 @@ namespace OpenSim.Region.Framework.Scenes if (entity is SceneObjectPart) { - PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor; - if (physActor == null || !physActor.IsPhysical) - priority += 100; - if (((SceneObjectPart)entity).ParentGroup.RootPart.IsAttachment) + { priority = 1.0; + } + else + { + PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor; + if (physActor == null || !physActor.IsPhysical) + priority += 100; + } + + if (((SceneObjectPart)entity).ParentGroup.RootPart != (SceneObjectPart)entity) + priority +=1; } return priority; }