diff options
author | Sean Dague | 2009-03-25 20:15:46 +0000 |
---|---|---|
committer | Sean Dague | 2009-03-25 20:15:46 +0000 |
commit | 6323516a834b5f3dc8056b4107e216c341a42166 (patch) | |
tree | 28a8a27afa123a36fe697e12fb99ba9646197b0c | |
parent | iar: centralize user uuid gathering (diff) | |
download | opensim-SC-6323516a834b5f3dc8056b4107e216c341a42166.zip opensim-SC-6323516a834b5f3dc8056b4107e216c341a42166.tar.gz opensim-SC-6323516a834b5f3dc8056b4107e216c341a42166.tar.bz2 opensim-SC-6323516a834b5f3dc8056b4107e216c341a42166.tar.xz |
* Appearance patches suite: These patches are applied to allow libomv bots to wear outfits in the future.
This functionality will be upstreamed later.
** Fixed call of new AvatarAppearance without arguments, which caused bots look like clouds of gas
** Added a SendAvatarData in ScenePresence.SetAppearance, which is expected after SetAppearance is run
** Fixed AssetXferUploader: CallbackID wasn't being passed on on multiple packets asset uploads
** Set VisualParams in AvatarAppearance to stop the alien looking bot from spawning and now looks a little better.
*** TODO: Set better VisualParams value then 150 to everything
Diffstat (limited to '')
5 files changed, 47 insertions, 29 deletions
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs index 2c97eee..e6949a6 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs | |||
@@ -196,7 +196,7 @@ namespace OpenSim.Client.Linden | |||
196 | if (agent.Appearance == null) | 196 | if (agent.Appearance == null) |
197 | { | 197 | { |
198 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); | 198 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); |
199 | agent.Appearance = new AvatarAppearance(); | 199 | agent.Appearance = new AvatarAppearance(agent.AgentID); |
200 | } | 200 | } |
201 | 201 | ||
202 | if (m_regionsConnector.RegionLoginsEnabled) | 202 | if (m_regionsConnector.RegionLoginsEnabled) |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 9e33ebc..9544d5a 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework | |||
38 | { | 38 | { |
39 | // private static readonly ILog m_log | 39 | // private static readonly ILog m_log |
40 | // = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | // = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 41 | ||
42 | // these are guessed at by the list here - | 42 | // these are guessed at by the list here - |
43 | // http://wiki.secondlife.com/wiki/Avatar_Appearance. We'll | 43 | // http://wiki.secondlife.com/wiki/Avatar_Appearance. We'll |
44 | // correct them over time for when were are wrong. | 44 | // correct them over time for when were are wrong. |
@@ -104,127 +104,127 @@ namespace OpenSim.Framework | |||
104 | get { return m_wearables[BODY].ItemID; } | 104 | get { return m_wearables[BODY].ItemID; } |
105 | set { m_wearables[BODY].ItemID = value; } | 105 | set { m_wearables[BODY].ItemID = value; } |
106 | } | 106 | } |
107 | 107 | ||
108 | public virtual UUID BodyAsset { | 108 | public virtual UUID BodyAsset { |
109 | get { return m_wearables[BODY].AssetID; } | 109 | get { return m_wearables[BODY].AssetID; } |
110 | set { m_wearables[BODY].AssetID = value; } | 110 | set { m_wearables[BODY].AssetID = value; } |
111 | } | 111 | } |
112 | 112 | ||
113 | public virtual UUID SkinItem { | 113 | public virtual UUID SkinItem { |
114 | get { return m_wearables[SKIN].ItemID; } | 114 | get { return m_wearables[SKIN].ItemID; } |
115 | set { m_wearables[SKIN].ItemID = value; } | 115 | set { m_wearables[SKIN].ItemID = value; } |
116 | } | 116 | } |
117 | 117 | ||
118 | public virtual UUID SkinAsset { | 118 | public virtual UUID SkinAsset { |
119 | get { return m_wearables[SKIN].AssetID; } | 119 | get { return m_wearables[SKIN].AssetID; } |
120 | set { m_wearables[SKIN].AssetID = value; } | 120 | set { m_wearables[SKIN].AssetID = value; } |
121 | } | 121 | } |
122 | 122 | ||
123 | public virtual UUID HairItem { | 123 | public virtual UUID HairItem { |
124 | get { return m_wearables[HAIR].ItemID; } | 124 | get { return m_wearables[HAIR].ItemID; } |
125 | set { m_wearables[HAIR].ItemID = value; } | 125 | set { m_wearables[HAIR].ItemID = value; } |
126 | } | 126 | } |
127 | 127 | ||
128 | public virtual UUID HairAsset { | 128 | public virtual UUID HairAsset { |
129 | get { return m_wearables[HAIR].AssetID; } | 129 | get { return m_wearables[HAIR].AssetID; } |
130 | set { m_wearables[HAIR].AssetID = value; } | 130 | set { m_wearables[HAIR].AssetID = value; } |
131 | } | 131 | } |
132 | 132 | ||
133 | public virtual UUID EyesItem { | 133 | public virtual UUID EyesItem { |
134 | get { return m_wearables[EYES].ItemID; } | 134 | get { return m_wearables[EYES].ItemID; } |
135 | set { m_wearables[EYES].ItemID = value; } | 135 | set { m_wearables[EYES].ItemID = value; } |
136 | } | 136 | } |
137 | 137 | ||
138 | public virtual UUID EyesAsset { | 138 | public virtual UUID EyesAsset { |
139 | get { return m_wearables[EYES].AssetID; } | 139 | get { return m_wearables[EYES].AssetID; } |
140 | set { m_wearables[EYES].AssetID = value; } | 140 | set { m_wearables[EYES].AssetID = value; } |
141 | } | 141 | } |
142 | 142 | ||
143 | public virtual UUID ShirtItem { | 143 | public virtual UUID ShirtItem { |
144 | get { return m_wearables[SHIRT].ItemID; } | 144 | get { return m_wearables[SHIRT].ItemID; } |
145 | set { m_wearables[SHIRT].ItemID = value; } | 145 | set { m_wearables[SHIRT].ItemID = value; } |
146 | } | 146 | } |
147 | 147 | ||
148 | public virtual UUID ShirtAsset { | 148 | public virtual UUID ShirtAsset { |
149 | get { return m_wearables[SHIRT].AssetID; } | 149 | get { return m_wearables[SHIRT].AssetID; } |
150 | set { m_wearables[SHIRT].AssetID = value; } | 150 | set { m_wearables[SHIRT].AssetID = value; } |
151 | } | 151 | } |
152 | 152 | ||
153 | public virtual UUID PantsItem { | 153 | public virtual UUID PantsItem { |
154 | get { return m_wearables[PANTS].ItemID; } | 154 | get { return m_wearables[PANTS].ItemID; } |
155 | set { m_wearables[PANTS].ItemID = value; } | 155 | set { m_wearables[PANTS].ItemID = value; } |
156 | } | 156 | } |
157 | 157 | ||
158 | public virtual UUID PantsAsset { | 158 | public virtual UUID PantsAsset { |
159 | get { return m_wearables[PANTS].AssetID; } | 159 | get { return m_wearables[PANTS].AssetID; } |
160 | set { m_wearables[PANTS].AssetID = value; } | 160 | set { m_wearables[PANTS].AssetID = value; } |
161 | } | 161 | } |
162 | 162 | ||
163 | public virtual UUID ShoesItem { | 163 | public virtual UUID ShoesItem { |
164 | get { return m_wearables[SHOES].ItemID; } | 164 | get { return m_wearables[SHOES].ItemID; } |
165 | set { m_wearables[SHOES].ItemID = value; } | 165 | set { m_wearables[SHOES].ItemID = value; } |
166 | } | 166 | } |
167 | 167 | ||
168 | public virtual UUID ShoesAsset { | 168 | public virtual UUID ShoesAsset { |
169 | get { return m_wearables[SHOES].AssetID; } | 169 | get { return m_wearables[SHOES].AssetID; } |
170 | set { m_wearables[SHOES].AssetID = value; } | 170 | set { m_wearables[SHOES].AssetID = value; } |
171 | } | 171 | } |
172 | 172 | ||
173 | public virtual UUID SocksItem { | 173 | public virtual UUID SocksItem { |
174 | get { return m_wearables[SOCKS].ItemID; } | 174 | get { return m_wearables[SOCKS].ItemID; } |
175 | set { m_wearables[SOCKS].ItemID = value; } | 175 | set { m_wearables[SOCKS].ItemID = value; } |
176 | } | 176 | } |
177 | 177 | ||
178 | public virtual UUID SocksAsset { | 178 | public virtual UUID SocksAsset { |
179 | get { return m_wearables[SOCKS].AssetID; } | 179 | get { return m_wearables[SOCKS].AssetID; } |
180 | set { m_wearables[SOCKS].AssetID = value; } | 180 | set { m_wearables[SOCKS].AssetID = value; } |
181 | } | 181 | } |
182 | 182 | ||
183 | public virtual UUID JacketItem { | 183 | public virtual UUID JacketItem { |
184 | get { return m_wearables[JACKET].ItemID; } | 184 | get { return m_wearables[JACKET].ItemID; } |
185 | set { m_wearables[JACKET].ItemID = value; } | 185 | set { m_wearables[JACKET].ItemID = value; } |
186 | } | 186 | } |
187 | 187 | ||
188 | public virtual UUID JacketAsset { | 188 | public virtual UUID JacketAsset { |
189 | get { return m_wearables[JACKET].AssetID; } | 189 | get { return m_wearables[JACKET].AssetID; } |
190 | set { m_wearables[JACKET].AssetID = value; } | 190 | set { m_wearables[JACKET].AssetID = value; } |
191 | } | 191 | } |
192 | 192 | ||
193 | public virtual UUID GlovesItem { | 193 | public virtual UUID GlovesItem { |
194 | get { return m_wearables[GLOVES].ItemID; } | 194 | get { return m_wearables[GLOVES].ItemID; } |
195 | set { m_wearables[GLOVES].ItemID = value; } | 195 | set { m_wearables[GLOVES].ItemID = value; } |
196 | } | 196 | } |
197 | 197 | ||
198 | public virtual UUID GlovesAsset { | 198 | public virtual UUID GlovesAsset { |
199 | get { return m_wearables[GLOVES].AssetID; } | 199 | get { return m_wearables[GLOVES].AssetID; } |
200 | set { m_wearables[GLOVES].AssetID = value; } | 200 | set { m_wearables[GLOVES].AssetID = value; } |
201 | } | 201 | } |
202 | 202 | ||
203 | public virtual UUID UnderShirtItem { | 203 | public virtual UUID UnderShirtItem { |
204 | get { return m_wearables[UNDERSHIRT].ItemID; } | 204 | get { return m_wearables[UNDERSHIRT].ItemID; } |
205 | set { m_wearables[UNDERSHIRT].ItemID = value; } | 205 | set { m_wearables[UNDERSHIRT].ItemID = value; } |
206 | } | 206 | } |
207 | 207 | ||
208 | public virtual UUID UnderShirtAsset { | 208 | public virtual UUID UnderShirtAsset { |
209 | get { return m_wearables[UNDERSHIRT].AssetID; } | 209 | get { return m_wearables[UNDERSHIRT].AssetID; } |
210 | set { m_wearables[UNDERSHIRT].AssetID = value; } | 210 | set { m_wearables[UNDERSHIRT].AssetID = value; } |
211 | } | 211 | } |
212 | 212 | ||
213 | public virtual UUID UnderPantsItem { | 213 | public virtual UUID UnderPantsItem { |
214 | get { return m_wearables[UNDERPANTS].ItemID; } | 214 | get { return m_wearables[UNDERPANTS].ItemID; } |
215 | set { m_wearables[UNDERPANTS].ItemID = value; } | 215 | set { m_wearables[UNDERPANTS].ItemID = value; } |
216 | } | 216 | } |
217 | 217 | ||
218 | public virtual UUID UnderPantsAsset { | 218 | public virtual UUID UnderPantsAsset { |
219 | get { return m_wearables[UNDERPANTS].AssetID; } | 219 | get { return m_wearables[UNDERPANTS].AssetID; } |
220 | set { m_wearables[UNDERPANTS].AssetID = value; } | 220 | set { m_wearables[UNDERPANTS].AssetID = value; } |
221 | } | 221 | } |
222 | 222 | ||
223 | public virtual UUID SkirtItem { | 223 | public virtual UUID SkirtItem { |
224 | get { return m_wearables[SKIRT].ItemID; } | 224 | get { return m_wearables[SKIRT].ItemID; } |
225 | set { m_wearables[SKIRT].ItemID = value; } | 225 | set { m_wearables[SKIRT].ItemID = value; } |
226 | } | 226 | } |
227 | 227 | ||
228 | public virtual UUID SkirtAsset { | 228 | public virtual UUID SkirtAsset { |
229 | get { return m_wearables[SKIRT].AssetID; } | 229 | get { return m_wearables[SKIRT].AssetID; } |
230 | set { m_wearables[SKIRT].AssetID = value; } | 230 | set { m_wearables[SKIRT].AssetID = value; } |
@@ -242,6 +242,15 @@ namespace OpenSim.Framework | |||
242 | m_wearables[PANTS].ItemID = PANTS_ITEM; | 242 | m_wearables[PANTS].ItemID = PANTS_ITEM; |
243 | } | 243 | } |
244 | 244 | ||
245 | public virtual void SetDefaultParams(byte[] vparams) | ||
246 | { | ||
247 | // TODO: Figure out better values then 'fat scientist 150' or 'alien 0' | ||
248 | for (int i = 0; i < VISUALPARAM_COUNT; i++) | ||
249 | { | ||
250 | vparams[i] = 150; | ||
251 | } | ||
252 | } | ||
253 | |||
245 | protected Primitive.TextureEntry m_texture; | 254 | protected Primitive.TextureEntry m_texture; |
246 | 255 | ||
247 | public virtual Primitive.TextureEntry Texture | 256 | public virtual Primitive.TextureEntry Texture |
@@ -280,6 +289,8 @@ namespace OpenSim.Framework | |||
280 | m_serial = 0; | 289 | m_serial = 0; |
281 | m_owner = owner; | 290 | m_owner = owner; |
282 | m_visualparams = new byte[VISUALPARAM_COUNT]; | 291 | m_visualparams = new byte[VISUALPARAM_COUNT]; |
292 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist | ||
293 | SetDefaultParams(m_visualparams); | ||
283 | SetDefaultWearables(); | 294 | SetDefaultWearables(); |
284 | m_texture = GetDefaultTexture(); | 295 | m_texture = GetDefaultTexture(); |
285 | } | 296 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index c52f825..2760b1e 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Communications.Local | |||
320 | else | 320 | else |
321 | { | 321 | { |
322 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); | 322 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); |
323 | agent.Appearance = new AvatarAppearance(); | 323 | agent.Appearance = new AvatarAppearance(agent.AgentID); |
324 | } | 324 | } |
325 | 325 | ||
326 | TriggerExpectUser(regionHandle, agent); | 326 | TriggerExpectUser(regionHandle, agent); |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 7803209..8bdf084 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -43,6 +43,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
43 | private UUID InventFolder = UUID.Zero; | 43 | private UUID InventFolder = UUID.Zero; |
44 | private sbyte invType = 0; | 44 | private sbyte invType = 0; |
45 | private bool m_createItem = false; | 45 | private bool m_createItem = false; |
46 | private uint m_createItemCallback = 0; | ||
46 | private string m_description = String.Empty; | 47 | private string m_description = String.Empty; |
47 | private bool m_dumpAssetToFile; | 48 | private bool m_dumpAssetToFile; |
48 | private bool m_finished = false; | 49 | private bool m_finished = false; |
@@ -148,7 +149,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
148 | m_finished = true; | 149 | m_finished = true; |
149 | if (m_createItem) | 150 | if (m_createItem) |
150 | { | 151 | { |
151 | DoCreateItem(0); | 152 | DoCreateItem(m_createItemCallback); |
152 | } | 153 | } |
153 | else if (m_storeLocal) | 154 | else if (m_storeLocal) |
154 | { | 155 | { |
@@ -205,6 +206,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
205 | else | 206 | else |
206 | { | 207 | { |
207 | m_createItem = true; //set flag so the inventory item is created when upload is complete | 208 | m_createItem = true; //set flag so the inventory item is created when upload is complete |
209 | m_createItemCallback = callbackID; | ||
208 | } | 210 | } |
209 | } | 211 | } |
210 | } | 212 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d6607b3..a6d1ad3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2389,6 +2389,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2389 | UpdateMovementAnimations(); | 2389 | UpdateMovementAnimations(); |
2390 | m_startAnimationSet = true; | 2390 | m_startAnimationSet = true; |
2391 | } | 2391 | } |
2392 | |||
2393 | Quaternion rot = m_bodyRot; | ||
2394 | m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | ||
2395 | m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot); | ||
2396 | |||
2392 | } | 2397 | } |
2393 | 2398 | ||
2394 | public void SetWearable(int wearableId, AvatarWearable wearable) | 2399 | public void SetWearable(int wearableId, AvatarWearable wearable) |