diff options
author | Melanie | 2012-04-27 01:31:12 +0100 |
---|---|---|
committer | Melanie | 2012-04-27 01:31:12 +0100 |
commit | 7397c9a68e3c5dd53e387d347b9c03a4f66ac603 (patch) | |
tree | 17ffda6bb90954719878defadf46967872eca642 | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
parent | revert last add commit (diff) | |
download | opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.zip opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.tar.gz opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.tar.bz2 opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.tar.xz |
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 34 | ||||
-rw-r--r-- | OpenSim/Framework/AvatarWearable.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IAvatarService.cs | 20 |
5 files changed, 54 insertions, 22 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 3a0b861..c5d9641 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework | |||
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | // this is viewer capabilities and weared things dependent | ||
46 | // should be only used as initial default value ( V1 viewers ) | ||
45 | public readonly static int VISUALPARAM_COUNT = 218; | 47 | public readonly static int VISUALPARAM_COUNT = 218; |
46 | 48 | ||
47 | public readonly static int TEXTURE_COUNT = 21; | 49 | public readonly static int TEXTURE_COUNT = 21; |
@@ -319,19 +321,30 @@ namespace OpenSim.Framework | |||
319 | // made. We determine if any of the visual parameters actually | 321 | // made. We determine if any of the visual parameters actually |
320 | // changed to know if the appearance should be saved later | 322 | // changed to know if the appearance should be saved later |
321 | bool changed = false; | 323 | bool changed = false; |
322 | for (int i = 0; i < AvatarAppearance.VISUALPARAM_COUNT; i++) | 324 | |
325 | int newsize = visualParams.Length; | ||
326 | |||
327 | if (newsize != m_visualparams.Length) | ||
328 | { | ||
329 | changed = true; | ||
330 | m_visualparams = (byte[])visualParams.Clone(); | ||
331 | } | ||
332 | else | ||
323 | { | 333 | { |
324 | if (visualParams[i] != m_visualparams[i]) | 334 | |
335 | for (int i = 0; i < newsize; i++) | ||
325 | { | 336 | { |
326 | // DEBUG ON | 337 | if (visualParams[i] != m_visualparams[i]) |
327 | // m_log.WarnFormat("[AVATARAPPEARANCE] vparams changed [{0}] {1} ==> {2}", | 338 | { |
328 | // i,m_visualparams[i],visualParams[i]); | 339 | // DEBUG ON |
329 | // DEBUG OFF | 340 | // m_log.WarnFormat("[AVATARAPPEARANCE] vparams changed [{0}] {1} ==> {2}", |
330 | m_visualparams[i] = visualParams[i]; | 341 | // i,m_visualparams[i],visualParams[i]); |
331 | changed = true; | 342 | // DEBUG OFF |
343 | m_visualparams[i] = visualParams[i]; | ||
344 | changed = true; | ||
345 | } | ||
332 | } | 346 | } |
333 | } | 347 | } |
334 | |||
335 | // Reset the height if the visual parameters actually changed | 348 | // Reset the height if the visual parameters actually changed |
336 | if (changed) | 349 | if (changed) |
337 | SetHeight(); | 350 | SetHeight(); |
@@ -389,7 +402,8 @@ namespace OpenSim.Framework | |||
389 | } | 402 | } |
390 | 403 | ||
391 | s += "Visual Params: "; | 404 | s += "Visual Params: "; |
392 | for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) | 405 | // for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) |
406 | for (uint j = 0; j < m_visualparams.Length; j++) | ||
393 | s += String.Format("{0},",m_visualparams[j]); | 407 | s += String.Format("{0},",m_visualparams[j]); |
394 | s += "\n"; | 408 | s += "\n"; |
395 | 409 | ||
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 8e27596..aee295a 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs | |||
@@ -62,9 +62,14 @@ namespace OpenSim.Framework | |||
62 | public static readonly int UNDERSHIRT = 10; | 62 | public static readonly int UNDERSHIRT = 10; |
63 | public static readonly int UNDERPANTS = 11; | 63 | public static readonly int UNDERPANTS = 11; |
64 | public static readonly int SKIRT = 12; | 64 | public static readonly int SKIRT = 12; |
65 | |||
66 | public static readonly int MAX_BASICWEARABLES = 13; | ||
67 | |||
65 | public static readonly int ALPHA = 13; | 68 | public static readonly int ALPHA = 13; |
66 | public static readonly int TATTOO = 14; | 69 | public static readonly int TATTOO = 14; |
70 | // public static readonly int PHYSICS = 15; | ||
67 | 71 | ||
72 | // public static readonly int MAX_WEARABLES = 16; | ||
68 | public static readonly int MAX_WEARABLES = 15; | 73 | public static readonly int MAX_WEARABLES = 15; |
69 | 74 | ||
70 | public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); | 75 | public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); |
@@ -219,7 +224,7 @@ namespace OpenSim.Framework | |||
219 | { | 224 | { |
220 | get | 225 | get |
221 | { | 226 | { |
222 | AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these | 227 | AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; |
223 | for (int i = 0; i < MAX_WEARABLES; i++) | 228 | for (int i = 0; i < MAX_WEARABLES; i++) |
224 | { | 229 | { |
225 | defaultWearables[i] = new AvatarWearable(); | 230 | defaultWearables[i] = new AvatarWearable(); |
@@ -242,10 +247,13 @@ namespace OpenSim.Framework | |||
242 | 247 | ||
243 | // // Alpha | 248 | // // Alpha |
244 | // defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); | 249 | // defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); |
245 | 250 | ||
246 | // // Tattoo | 251 | // // Tattoo |
247 | // defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); | 252 | // defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); |
248 | 253 | ||
254 | // // Physics | ||
255 | // defaultWearables[PHYSICS].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); | ||
256 | |||
249 | return defaultWearables; | 257 | return defaultWearables; |
250 | } | 258 | } |
251 | } | 259 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 1004be6..40ebed1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3533,7 +3533,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3533 | 3533 | ||
3534 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); | 3534 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); |
3535 | // TODO: don't create new blocks if recycling an old packet | 3535 | // TODO: don't create new blocks if recycling an old packet |
3536 | avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; | 3536 | avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[visualParams.Length]; |
3537 | avp.ObjectData.TextureEntry = textureEntry; | 3537 | avp.ObjectData.TextureEntry = textureEntry; |
3538 | 3538 | ||
3539 | AvatarAppearancePacket.VisualParamBlock avblock = null; | 3539 | AvatarAppearancePacket.VisualParamBlock avblock = null; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f6f6a1a..982913a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
357 | sceneObject.RootPart.ApplyImpulse((vel * sceneObject.GetMass()), false); | 357 | sceneObject.RootPart.ApplyImpulse((vel * sceneObject.GetMass()), false); |
358 | sceneObject.Velocity = vel; | 358 | sceneObject.Velocity = vel; |
359 | } | 359 | } |
360 | 360 | ||
361 | return true; | 361 | return true; |
362 | } | 362 | } |
363 | 363 | ||
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index cda7113..8412c35 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs | |||
@@ -162,10 +162,16 @@ namespace OpenSim.Services.Interfaces | |||
162 | } | 162 | } |
163 | 163 | ||
164 | // Visual Params | 164 | // Visual Params |
165 | string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; | 165 | // string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; |
166 | // byte[] binary = appearance.VisualParams; | ||
167 | |||
168 | // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) | ||
169 | |||
170 | |||
166 | byte[] binary = appearance.VisualParams; | 171 | byte[] binary = appearance.VisualParams; |
172 | string[] vps = new string[binary.Length]; | ||
167 | 173 | ||
168 | for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) | 174 | for (int i = 0; i < binary.Length; i++) |
169 | { | 175 | { |
170 | vps[i] = binary[i].ToString(); | 176 | vps[i] = binary[i].ToString(); |
171 | } | 177 | } |
@@ -265,10 +271,14 @@ namespace OpenSim.Services.Interfaces | |||
265 | if (Data.ContainsKey("VisualParams")) | 271 | if (Data.ContainsKey("VisualParams")) |
266 | { | 272 | { |
267 | string[] vps = Data["VisualParams"].Split(new char[] {','}); | 273 | string[] vps = Data["VisualParams"].Split(new char[] {','}); |
268 | byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; | 274 | // byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; |
275 | |||
276 | // for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) | ||
277 | byte[] binary = new byte[vps.Length]; | ||
278 | |||
279 | for (int i = 0; i < vps.Length; i++) | ||
269 | 280 | ||
270 | for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) | 281 | binary[i] = (byte)Convert.ToInt32(vps[i]); |
271 | binary[i] = (byte)Convert.ToInt32(vps[i]); | ||
272 | 282 | ||
273 | appearance.VisualParams = binary; | 283 | appearance.VisualParams = binary; |
274 | } | 284 | } |