aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorOren Hurvitz2014-07-20 18:53:11 +0300
committerJustin Clark-Casey2014-08-02 00:57:24 +0100
commit8de1be746fefa6ff3950083ae36ddef03bb66548 (patch)
treea11eccd9ccbe6e039187261b5f25a7761618e1e7
parentDon't append attachments multiple times (diff)
downloadopensim-SC-8de1be746fefa6ff3950083ae36ddef03bb66548.zip
opensim-SC-8de1be746fefa6ff3950083ae36ddef03bb66548.tar.gz
opensim-SC-8de1be746fefa6ff3950083ae36ddef03bb66548.tar.bz2
opensim-SC-8de1be746fefa6ff3950083ae36ddef03bb66548.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.cs23
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 493090c..e478322 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1192,19 +1192,17 @@ namespace OpenSim.Region.Framework.Scenes
1192 // and it has already rezzed the attachments and started their scripts. 1192 // and it has already rezzed the attachments and started their scripts.
1193 // We do the following only for non-login agents, because their scripts 1193 // We do the following only for non-login agents, because their scripts
1194 // haven't started yet. 1194 // haven't started yet.
1195 if (PresenceType == PresenceType.Npc || (TeleportFlags & TeleportFlags.ViaLogin) != 0) 1195 if (PresenceType == PresenceType.Npc || IsRealLogin(m_teleportFlags))
1196 { 1196 {
1197 // Viewers which have a current outfit folder will actually rez their own attachments. However, 1197 // Viewers which have a current outfit folder will actually rez their own attachments. However,
1198 // viewers without (e.g. v1 viewers) will not, so we still need to make this call. 1198 // viewers without (e.g. v1 viewers) will not, so we still need to make this call.
1199 if (Scene.AttachmentsModule != null) 1199 if (Scene.AttachmentsModule != null)
1200 Util.FireAndForget( 1200 {
1201 o => 1201 Util.FireAndForget(o =>
1202 { 1202 {
1203// if (PresenceType != PresenceType.Npc && Util.FireAndForgetMethod != FireAndForgetMethod.None) 1203 Scene.AttachmentsModule.RezAttachments(this);
1204// System.Threading.Thread.Sleep(7000); 1204 });
1205 1205 }
1206 Scene.AttachmentsModule.RezAttachments(this);
1207 });
1208 } 1206 }
1209 else 1207 else
1210 { 1208 {
@@ -1266,6 +1264,11 @@ namespace OpenSim.Region.Framework.Scenes
1266 return true; 1264 return true;
1267 } 1265 }
1268 1266
1267 private static bool IsRealLogin(TeleportFlags teleportFlags)
1268 {
1269 return ((teleportFlags & TeleportFlags.ViaLogin) != 0) && ((teleportFlags & TeleportFlags.ViaHGLogin) == 0);
1270 }
1271
1269 /// <summary> 1272 /// <summary>
1270 /// Force viewers to show the avatar's current name. 1273 /// Force viewers to show the avatar's current name.
1271 /// </summary> 1274 /// </summary>
@@ -1697,7 +1700,7 @@ namespace OpenSim.Region.Framework.Scenes
1697 try 1700 try
1698 { 1701 {
1699 // Make sure it's not a login agent. We don't want to wait for updates during login 1702 // Make sure it's not a login agent. We don't want to wait for updates during login
1700 if (PresenceType != PresenceType.Npc && (m_teleportFlags & TeleportFlags.ViaLogin) == 0) 1703 if (!(PresenceType == PresenceType.Npc || IsRealLogin(m_teleportFlags)))
1701 { 1704 {
1702 // Let's wait until UpdateAgent (called by departing region) is done 1705 // Let's wait until UpdateAgent (called by departing region) is done
1703 if (!WaitForUpdateAgent(client)) 1706 if (!WaitForUpdateAgent(client))