diff options
author | Melanie | 2012-02-01 10:08:45 +0000 |
---|---|---|
committer | Melanie | 2012-02-01 10:08:45 +0000 |
commit | 16aa00e944f73a0a8fd2bd4ae9577f5dfb210bbe (patch) | |
tree | 1ffd8f2989976713ea79bbc1017a58a8925f1793 /OpenSim/Region/Framework | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Small optimization to last commit (diff) | |
download | opensim-SC_OLD-16aa00e944f73a0a8fd2bd4ae9577f5dfb210bbe.zip opensim-SC_OLD-16aa00e944f73a0a8fd2bd4ae9577f5dfb210bbe.tar.gz opensim-SC_OLD-16aa00e944f73a0a8fd2bd4ae9577f5dfb210bbe.tar.bz2 opensim-SC_OLD-16aa00e944f73a0a8fd2bd4ae9577f5dfb210bbe.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 |
3 files changed, 23 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index a7770ad..69ce967 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
47 | /// Save the attachments that have change on this presence. | 47 | /// Save the attachments that have change on this presence. |
48 | /// </summary> | 48 | /// </summary> |
49 | /// <param name="sp"></param> | 49 | /// <param name="sp"></param> |
50 | void SaveChangedAttachments(IScenePresence sp); | 50 | void SaveChangedAttachments(IScenePresence sp, bool saveAllScripted); |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Delete all the presence's attachments from the scene | 53 | /// Delete all the presence's attachments from the scene |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 273d8bd..b37df82 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3191,11 +3191,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3191 | public override void RemoveClient(UUID agentID, bool closeChildAgents) | 3191 | public override void RemoveClient(UUID agentID, bool closeChildAgents) |
3192 | { | 3192 | { |
3193 | CheckHeartbeat(); | 3193 | CheckHeartbeat(); |
3194 | bool childagentYN = false; | 3194 | bool isChildAgent = false; |
3195 | ScenePresence avatar = GetScenePresence(agentID); | 3195 | ScenePresence avatar = GetScenePresence(agentID); |
3196 | if (avatar != null) | 3196 | if (avatar != null) |
3197 | { | 3197 | { |
3198 | childagentYN = avatar.IsChildAgent; | 3198 | isChildAgent = avatar.IsChildAgent; |
3199 | 3199 | ||
3200 | if (avatar.ParentID != 0) | 3200 | if (avatar.ParentID != 0) |
3201 | { | 3201 | { |
@@ -3206,9 +3206,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3206 | { | 3206 | { |
3207 | m_log.DebugFormat( | 3207 | m_log.DebugFormat( |
3208 | "[SCENE]: Removing {0} agent {1} from region {2}", | 3208 | "[SCENE]: Removing {0} agent {1} from region {2}", |
3209 | (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); | 3209 | (isChildAgent ? "child" : "root"), agentID, RegionInfo.RegionName); |
3210 | 3210 | ||
3211 | m_sceneGraph.removeUserCount(!childagentYN); | 3211 | m_sceneGraph.removeUserCount(!isChildAgent); |
3212 | 3212 | ||
3213 | // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop | 3213 | // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop |
3214 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI | 3214 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI |
@@ -3239,8 +3239,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3239 | { | 3239 | { |
3240 | m_eventManager.TriggerOnRemovePresence(agentID); | 3240 | m_eventManager.TriggerOnRemovePresence(agentID); |
3241 | 3241 | ||
3242 | if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc) | 3242 | if (AttachmentsModule != null && !isChildAgent && avatar.PresenceType != PresenceType.Npc) |
3243 | AttachmentsModule.SaveChangedAttachments(avatar); | 3243 | { |
3244 | IUserManagement uMan = RequestModuleInterface<IUserManagement>(); | ||
3245 | // Don't save attachments for HG visitors, it | ||
3246 | // messes up their inventory. When a HG visitor logs | ||
3247 | // out on a foreign grid, their attachments will be | ||
3248 | // reloaded in the state they were in when they left | ||
3249 | // the home grid. This is best anyway as the visited | ||
3250 | // grid may use an incompatible script engine. | ||
3251 | if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) | ||
3252 | AttachmentsModule.SaveChangedAttachments(avatar, false); | ||
3253 | } | ||
3244 | 3254 | ||
3245 | ForEachClient( | 3255 | ForEachClient( |
3246 | delegate(IClientAPI client) | 3256 | delegate(IClientAPI client) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index cf7bf16..c31cbab 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -327,6 +327,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
327 | set { RootPart.Name = value; } | 327 | set { RootPart.Name = value; } |
328 | } | 328 | } |
329 | 329 | ||
330 | public string Description | ||
331 | { | ||
332 | get { return RootPart.Description; } | ||
333 | set { RootPart.Description = value; } | ||
334 | } | ||
335 | |||
330 | /// <summary> | 336 | /// <summary> |
331 | /// Added because the Parcel code seems to use it | 337 | /// Added because the Parcel code seems to use it |
332 | /// but not sure a object should have this | 338 | /// but not sure a object should have this |