diff options
author | Oren Hurvitz | 2014-07-20 18:53:11 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-07-21 09:29:51 +0100 |
commit | 899bcb7acd9085c103efd6f78878bc4a8c70577f (patch) | |
tree | 0b2ce28bd6be6e2be85ed3d99763f53e6ed07a70 | |
parent | Don't append attachments multiple times (diff) | |
download | opensim-SC_OLD-899bcb7acd9085c103efd6f78878bc4a8c70577f.zip opensim-SC_OLD-899bcb7acd9085c103efd6f78878bc4a8c70577f.tar.gz opensim-SC_OLD-899bcb7acd9085c103efd6f78878bc4a8c70577f.tar.bz2 opensim-SC_OLD-899bcb7acd9085c103efd6f78878bc4a8c70577f.tar.xz |
Fixed: after a Hypergrid teleport, attachments often either disappear, or appear both on the avatar AND as in-world objects.
Another manifestation of this bug is that after a Hypergrid teleport, when you click on one of the avatar's attachments the object doesn't show its name. This means that the viewer knows the attachment is there, but the simulator does not.
The problem was caused by treating Hypergrid teleports as if they're Logins (because the teleport flag ViaLogin is enabled).
This may fix: http://opensimulator.org/mantis/view.php?id=7238
This may fix: http://opensimulator.org/mantis/view.php?id=7220
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b94f26e..34c6f7c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1193,19 +1193,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1193 | // and it has already rezzed the attachments and started their scripts. | 1193 | // and it has already rezzed the attachments and started their scripts. |
1194 | // We do the following only for non-login agents, because their scripts | 1194 | // We do the following only for non-login agents, because their scripts |
1195 | // haven't started yet. | 1195 | // haven't started yet. |
1196 | if (PresenceType == PresenceType.Npc || (TeleportFlags & TeleportFlags.ViaLogin) != 0) | 1196 | if (PresenceType == PresenceType.Npc || IsRealLogin(m_teleportFlags)) |
1197 | { | 1197 | { |
1198 | // Viewers which have a current outfit folder will actually rez their own attachments. However, | 1198 | // Viewers which have a current outfit folder will actually rez their own attachments. However, |
1199 | // viewers without (e.g. v1 viewers) will not, so we still need to make this call. | 1199 | // viewers without (e.g. v1 viewers) will not, so we still need to make this call. |
1200 | if (Scene.AttachmentsModule != null) | 1200 | if (Scene.AttachmentsModule != null) |
1201 | Util.FireAndForget( | 1201 | { |
1202 | o => | 1202 | Util.FireAndForget(o => |
1203 | { | 1203 | { |
1204 | // if (PresenceType != PresenceType.Npc && Util.FireAndForgetMethod != FireAndForgetMethod.None) | 1204 | Scene.AttachmentsModule.RezAttachments(this); |
1205 | // System.Threading.Thread.Sleep(7000); | 1205 | }); |
1206 | 1206 | } | |
1207 | Scene.AttachmentsModule.RezAttachments(this); | ||
1208 | }); | ||
1209 | } | 1207 | } |
1210 | else | 1208 | else |
1211 | { | 1209 | { |
@@ -1267,6 +1265,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1267 | return true; | 1265 | return true; |
1268 | } | 1266 | } |
1269 | 1267 | ||
1268 | private static bool IsRealLogin(TeleportFlags teleportFlags) | ||
1269 | { | ||
1270 | return ((teleportFlags & TeleportFlags.ViaLogin) != 0) && ((teleportFlags & TeleportFlags.ViaHGLogin) == 0); | ||
1271 | } | ||
1272 | |||
1270 | /// <summary> | 1273 | /// <summary> |
1271 | /// Force viewers to show the avatar's current name. | 1274 | /// Force viewers to show the avatar's current name. |
1272 | /// </summary> | 1275 | /// </summary> |
@@ -1698,7 +1701,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1698 | try | 1701 | try |
1699 | { | 1702 | { |
1700 | // Make sure it's not a login agent. We don't want to wait for updates during login | 1703 | // Make sure it's not a login agent. We don't want to wait for updates during login |
1701 | if (PresenceType != PresenceType.Npc && (m_teleportFlags & TeleportFlags.ViaLogin) == 0) | 1704 | if (!(PresenceType == PresenceType.Npc || IsRealLogin(m_teleportFlags))) |
1702 | { | 1705 | { |
1703 | // Let's wait until UpdateAgent (called by departing region) is done | 1706 | // Let's wait until UpdateAgent (called by departing region) is done |
1704 | if (!WaitForUpdateAgent(client)) | 1707 | if (!WaitForUpdateAgent(client)) |