diff options
author | Justin Clark-Casey (justincc) | 2011-08-02 00:13:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-02 00:13:04 +0100 |
commit | b6ac1c46cd473b129b70344f0001f1e8f97d8860 (patch) | |
tree | 46e5d02205b63d16f29b3aaf6a3ad910192aaeb6 /OpenSim/Framework/AvatarAppearance.cs | |
parent | Get osNpcCreate appearance working with avatars that are currently in the scene. (diff) | |
download | opensim-SC_OLD-b6ac1c46cd473b129b70344f0001f1e8f97d8860.zip opensim-SC_OLD-b6ac1c46cd473b129b70344f0001f1e8f97d8860.tar.gz opensim-SC_OLD-b6ac1c46cd473b129b70344f0001f1e8f97d8860.tar.bz2 opensim-SC_OLD-b6ac1c46cd473b129b70344f0001f1e8f97d8860.tar.xz |
Get rid of AvatarAppearance.Owner to simplify the code.
This is not used for anything - appearances are always properties of objects with ids (ScenePresence, AgentCircuitData) and just has the potential to get out of sync when the appearance is cloned.
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 6b1f58a..73b068d 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -47,7 +47,6 @@ namespace OpenSim.Framework | |||
47 | public readonly static int TEXTURE_COUNT = 21; | 47 | public readonly static int TEXTURE_COUNT = 21; |
48 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; | 48 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; |
49 | 49 | ||
50 | protected UUID m_owner; | ||
51 | protected int m_serial = 0; | 50 | protected int m_serial = 0; |
52 | protected byte[] m_visualparams; | 51 | protected byte[] m_visualparams; |
53 | protected Primitive.TextureEntry m_texture; | 52 | protected Primitive.TextureEntry m_texture; |
@@ -56,12 +55,6 @@ namespace OpenSim.Framework | |||
56 | protected float m_avatarHeight = 0; | 55 | protected float m_avatarHeight = 0; |
57 | protected float m_hipOffset = 0; | 56 | protected float m_hipOffset = 0; |
58 | 57 | ||
59 | public virtual UUID Owner | ||
60 | { | ||
61 | get { return m_owner; } | ||
62 | set { m_owner = value; } | ||
63 | } | ||
64 | |||
65 | public virtual int Serial | 58 | public virtual int Serial |
66 | { | 59 | { |
67 | get { return m_serial; } | 60 | get { return m_serial; } |
@@ -101,38 +94,31 @@ namespace OpenSim.Framework | |||
101 | get { return m_hipOffset; } | 94 | get { return m_hipOffset; } |
102 | } | 95 | } |
103 | 96 | ||
104 | public AvatarAppearance() : this(UUID.Zero) {} | 97 | public AvatarAppearance() |
105 | |||
106 | public AvatarAppearance(UUID owner) | ||
107 | { | 98 | { |
108 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner); | 99 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); |
109 | 100 | ||
110 | m_serial = 0; | 101 | m_serial = 0; |
111 | m_owner = owner; | ||
112 | |||
113 | SetDefaultWearables(); | 102 | SetDefaultWearables(); |
114 | SetDefaultTexture(); | 103 | SetDefaultTexture(); |
115 | SetDefaultParams(); | 104 | SetDefaultParams(); |
116 | SetHeight(); | 105 | SetHeight(); |
117 | |||
118 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); | 106 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); |
119 | } | 107 | } |
120 | 108 | ||
121 | public AvatarAppearance(UUID avatarID, OSDMap map) | 109 | public AvatarAppearance(OSDMap map) |
122 | { | 110 | { |
123 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID); | 111 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance from OSDMap"); |
124 | 112 | ||
125 | m_owner = avatarID; | ||
126 | Unpack(map); | 113 | Unpack(map); |
127 | SetHeight(); | 114 | SetHeight(); |
128 | } | 115 | } |
129 | 116 | ||
130 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) | 117 | public AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) |
131 | { | 118 | { |
132 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); | 119 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance"); |
133 | 120 | ||
134 | m_serial = 0; | 121 | m_serial = 0; |
135 | m_owner = avatarID; | ||
136 | 122 | ||
137 | if (wearables != null) | 123 | if (wearables != null) |
138 | m_wearables = wearables; | 124 | m_wearables = wearables; |
@@ -165,24 +151,21 @@ namespace OpenSim.Framework | |||
165 | if (appearance == null) | 151 | if (appearance == null) |
166 | { | 152 | { |
167 | m_serial = 0; | 153 | m_serial = 0; |
168 | m_owner = UUID.Zero; | ||
169 | |||
170 | SetDefaultWearables(); | 154 | SetDefaultWearables(); |
171 | SetDefaultTexture(); | 155 | SetDefaultTexture(); |
172 | SetDefaultParams(); | 156 | SetDefaultParams(); |
173 | SetHeight(); | 157 | SetHeight(); |
174 | |||
175 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); | 158 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); |
176 | 159 | ||
177 | return; | 160 | return; |
178 | } | 161 | } |
179 | 162 | ||
180 | m_serial = appearance.Serial; | 163 | m_serial = appearance.Serial; |
181 | m_owner = appearance.Owner; | ||
182 | 164 | ||
183 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; | 165 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; |
184 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 166 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
185 | m_wearables[i] = new AvatarWearable(); | 167 | m_wearables[i] = new AvatarWearable(); |
168 | |||
186 | if (copyWearables && (appearance.Wearables != null)) | 169 | if (copyWearables && (appearance.Wearables != null)) |
187 | { | 170 | { |
188 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 171 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |