aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-18 00:53:05 +0100
committerJustin Clark-Casey (justincc)2011-08-18 00:53:05 +0100
commitc1a34cd8da293e63d3cba70b5271c9a297789db2 (patch)
treef6d87f42151ca8891cb37ed1bf2a5d5361c86ddf /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentcomment out noisy attachments logging (diff)
downloadopensim-SC-c1a34cd8da293e63d3cba70b5271c9a297789db2.zip
opensim-SC-c1a34cd8da293e63d3cba70b5271c9a297789db2.tar.gz
opensim-SC-c1a34cd8da293e63d3cba70b5271c9a297789db2.tar.bz2
opensim-SC-c1a34cd8da293e63d3cba70b5271c9a297789db2.tar.xz
Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc. This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 90c4706..e3bd393 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -75,6 +75,11 @@ namespace OpenSim.Region.Framework.Scenes
75 75
76 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 76 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
77 77
78 /// <summary>
79 /// What type of presence is this? User, NPC, etc.
80 /// </summary>
81 public PresenceType PresenceType { get; private set; }
82
78// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); 83// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes();
79 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); 84 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags));
80 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); 85 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f);
@@ -715,8 +720,9 @@ namespace OpenSim.Region.Framework.Scenes
715 m_animator = new ScenePresenceAnimator(this); 720 m_animator = new ScenePresenceAnimator(this);
716 } 721 }
717 722
718 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() 723 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, PresenceType type) : this()
719 { 724 {
725 PresenceType = type;
720 m_DrawDistance = world.DefaultDrawDistance; 726 m_DrawDistance = world.DefaultDrawDistance;
721 m_rootRegionHandle = reginfo.RegionHandle; 727 m_rootRegionHandle = reginfo.RegionHandle;
722 m_controllingClient = client; 728 m_controllingClient = client;
@@ -764,8 +770,8 @@ namespace OpenSim.Region.Framework.Scenes
764 SetDirectionVectors(); 770 SetDirectionVectors();
765 } 771 }
766 772
767 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance) 773 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance, PresenceType type)
768 : this(client, world, reginfo) 774 : this(client, world, reginfo, type)
769 { 775 {
770 m_appearance = appearance; 776 m_appearance = appearance;
771 } 777 }