diff --git a/OpenMetaverse/AppearanceManager.cs b/OpenMetaverse/AppearanceManager.cs index d801dbe9..3570b916 100644 --- a/OpenMetaverse/AppearanceManager.cs +++ b/OpenMetaverse/AppearanceManager.cs @@ -115,7 +115,7 @@ namespace OpenMetaverse const int REBAKE_DELAY = 1000 * 20; /// Total number of wearables for each avatar - public const int WEARABLE_COUNT = 15; + public const int WEARABLE_COUNT = 16; /// Total number of baked textures on each avatar public const int BAKED_TEXTURE_COUNT = 6; /// Total number of wearables per bake layer @@ -1671,7 +1671,28 @@ namespace OpenMetaverse #region VisualParam int vpIndex = 0; - set.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[218]; + int nrParams; + bool wearingPhysics = false; + + foreach (WearableData wearable in Wearables.Values) + { + if (wearable.WearableType == WearableType.Physics) + { + wearingPhysics = true; + break; + } + } + + if (wearingPhysics) + { + nrParams = 251; + } + else + { + nrParams = 218; + } + + set.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[nrParams]; foreach (KeyValuePair kvp in VisualParams.Params) { @@ -1726,6 +1747,8 @@ namespace OpenMetaverse agentSizeVPHipLength = paramValue; break; } + + if (vpIndex == nrParams) break; } #endregion VisualParam @@ -2068,6 +2091,7 @@ namespace OpenMetaverse case WearableType.Skirt: case WearableType.Tattoo: case WearableType.Alpha: + case WearableType.Physics: return AssetType.Clothing; default: return AssetType.Unknown; diff --git a/OpenMetaverse/_VisualParam_.cs b/OpenMetaverse/_VisualParam_.cs index 4fc8bd95..4114541d 100644 --- a/OpenMetaverse/_VisualParam_.cs +++ b/OpenMetaverse/_VisualParam_.cs @@ -471,6 +471,7 @@ namespace OpenMetaverse Params[850] = new VisualParam(850, "skirt_saddlebags", 1, "skirt", String.Empty, String.Empty, String.Empty, -0.5f, -0.5f, 3f, false, null, null, null); Params[851] = new VisualParam(851, "skirt_chubby", 1, "skirt", String.Empty, "less", "more", 0f, 0f, 1f, false, null, null, null); Params[852] = new VisualParam(852, "skirt_bigbutt", 1, "skirt", "bigbutt skirt", "less", "more", 0f, 0f, 1f, false, null, null, null); + Params[854] = new VisualParam(854, "Saddlebags", 1, "shape", String.Empty, String.Empty, String.Empty, -0.5f, -0.5f, 3f, false, null, null, null); Params[855] = new VisualParam(855, "Love_Handles", 1, "shape", String.Empty, String.Empty, String.Empty, 0f, -1f, 2f, false, null, null, null); Params[856] = new VisualParam(856, "skirt_lovehandles", 1, "skirt", String.Empty, "less", "more", 0f, -1f, 2f, false, null, null, null); Params[857] = new VisualParam(857, "skirt_male", 1, "skirt", String.Empty, String.Empty, String.Empty, 0f, 0f, 1f, false, null, null, null); @@ -566,6 +567,59 @@ namespace OpenMetaverse Params[1059] = new VisualParam(1059, "Glove Length bump", 1, "gloves", String.Empty, String.Empty, String.Empty, 0.8f, 0.01f, 1f, true, null, new VisualAlphaParam(0.01f, "glove_length_alpha.tga", false, false), null); Params[1060] = new VisualParam(1060, "Glove Fingers", 1, "gloves", String.Empty, String.Empty, String.Empty, 1f, 0.01f, 1f, false, null, new VisualAlphaParam(0.01f, "gloves_fingers_alpha.tga", false, true), null); Params[1061] = new VisualParam(1061, "Glove Fingers bump", 1, "gloves", String.Empty, String.Empty, String.Empty, 1f, 0.01f, 1f, true, null, new VisualAlphaParam(0.01f, "gloves_fingers_alpha.tga", false, true), null); + Params[1062] = new VisualParam(1062, "tattoo_head_red", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(255, 0, 0, 255) })); + Params[1063] = new VisualParam(1063, "tattoo_head_green", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(0, 255, 0, 255) })); + Params[1064] = new VisualParam(1064, "tattoo_head_blue", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(0, 0, 255, 255) })); + Params[1065] = new VisualParam(1065, "tattoo_upper_red", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(255, 0, 0, 255) })); + Params[1066] = new VisualParam(1066, "tattoo_upper_green", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(0, 255, 0, 255) })); + Params[1067] = new VisualParam(1067, "tattoo_upper_blue", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(0, 0, 255, 255) })); + Params[1068] = new VisualParam(1068, "tattoo_lower_red", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(255, 0, 0, 255) })); + Params[1069] = new VisualParam(1069, "tattoo_lower_green", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(0, 255, 0, 255) })); + Params[1070] = new VisualParam(1070, "tattoo_lower_blue", 1, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, null, null, new VisualColorParam(VisualColorOperation.Add, new Color4[] { new Color4(0, 0, 0, 255), new Color4(0, 0, 255, 255) })); + Params[1071] = new VisualParam(1071, "tattoo_red", 2, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, new int[] { 1062, 1065, 1068 }, null, null); + Params[1072] = new VisualParam(1072, "tattoo_green", 2, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, new int[] { 1063, 1066, 1069 }, null, null); + Params[1073] = new VisualParam(1073, "tattoo_blue", 2, "tattoo", String.Empty, String.Empty, String.Empty, 1f, 0f, 1f, false, new int[] { 1064, 1067, 1070 }, null, null); + Params[1200] = new VisualParam(1200, "Breast_Physics_UpDown_Driven", 1, "shape", String.Empty, String.Empty, String.Empty, 0f, -3f, 3f, false, null, null, null); + Params[1201] = new VisualParam(1201, "Breast_Physics_InOut_Driven", 1, "shape", String.Empty, String.Empty, String.Empty, 0f, -1.25f, 1.25f, false, null, null, null); + Params[1202] = new VisualParam(1202, "Belly_Physics_Legs_UpDown_Driven", 1, "physics", String.Empty, String.Empty, String.Empty, -1f, -1f, 1f, false, null, null, null); + Params[1203] = new VisualParam(1203, "Belly_Physics_Skirt_UpDown_Driven", 1, "physics", String.Empty, String.Empty, String.Empty, 0f, -1f, 1f, false, null, null, null); + Params[1204] = new VisualParam(1204, "Belly_Physics_Torso_UpDown_Driven", 1, "physics", String.Empty, String.Empty, String.Empty, 0f, -1f, 1f, false, null, null, null); + Params[1205] = new VisualParam(1205, "Butt_Physics_UpDown_Driven", 1, "physics", String.Empty, String.Empty, String.Empty, 0f, -1f, 1f, false, null, null, null); + Params[1206] = new VisualParam(1206, "Butt_Physics_LeftRight_Driven", 1, "physics", String.Empty, String.Empty, String.Empty, 0f, -1f, 1f, false, null, null, null); + Params[1207] = new VisualParam(1207, "Breast_Physics_LeftRight_Driven", 1, "physics", String.Empty, String.Empty, String.Empty, 0f, -2f, 2f, false, null, null, null); + Params[10000] = new VisualParam(10000, "Breast_Physics_Mass", 0, "physics", "Breast Physics Mass", String.Empty, String.Empty, 0.1f, 0.1f, 1f, false, null, null, null); + Params[10001] = new VisualParam(10001, "Breast_Physics_Gravity", 0, "physics", "Breast Physics Gravity", String.Empty, String.Empty, 0f, 0f, 30f, false, null, null, null); + Params[10002] = new VisualParam(10002, "Breast_Physics_Drag", 0, "physics", "Breast Physics Drag", String.Empty, String.Empty, 1f, 0f, 10f, false, null, null, null); + Params[10003] = new VisualParam(10003, "Breast_Physics_UpDown_Max_Effect", 0, "physics", "Breast Physics UpDown Max Effect", String.Empty, String.Empty, 0f, 0f, 3f, false, null, null, null); + Params[10004] = new VisualParam(10004, "Breast_Physics_UpDown_Spring", 0, "physics", "Breast Physics UpDown Spring", String.Empty, String.Empty, 10f, 0f, 100f, false, null, null, null); + Params[10005] = new VisualParam(10005, "Breast_Physics_UpDown_Gain", 0, "physics", "Breast Physics UpDown Gain", String.Empty, String.Empty, 10f, 1f, 100f, false, null, null, null); + Params[10006] = new VisualParam(10006, "Breast_Physics_UpDown_Damping", 0, "physics", "Breast Physics UpDown Damping", String.Empty, String.Empty, 0.2f, 0f, 1f, false, null, null, null); + Params[10007] = new VisualParam(10007, "Breast_Physics_InOut_Max_Effect", 0, "physics", "Breast Physics InOut Max Effect", String.Empty, String.Empty, 0f, 0f, 3f, false, null, null, null); + Params[10008] = new VisualParam(10008, "Breast_Physics_InOut_Spring", 0, "physics", "Breast Physics InOut Spring", String.Empty, String.Empty, 10f, 0f, 100f, false, null, null, null); + Params[10009] = new VisualParam(10009, "Breast_Physics_InOut_Gain", 0, "physics", "Breast Physics InOut Gain", String.Empty, String.Empty, 10f, 1f, 100f, false, null, null, null); + Params[10010] = new VisualParam(10010, "Breast_Physics_InOut_Damping", 0, "physics", "Breast Physics InOut Damping", String.Empty, String.Empty, 0.2f, 0f, 1f, false, null, null, null); + Params[10011] = new VisualParam(10011, "Belly_Physics_Mass", 0, "physics", "Belly Physics Mass", String.Empty, String.Empty, 0.1f, 0.1f, 1f, false, null, null, null); + Params[10012] = new VisualParam(10012, "Belly_Physics_Gravity", 0, "physics", "Belly Physics Gravity", String.Empty, String.Empty, 0f, 0f, 30f, false, null, null, null); + Params[10013] = new VisualParam(10013, "Belly_Physics_Drag", 0, "physics", "Belly Physics Drag", String.Empty, String.Empty, 1f, 0f, 10f, false, null, null, null); + Params[10014] = new VisualParam(10014, "Belly_Physics_UpDown_Max_Effect", 0, "physics", "Belly Physics UpDown Max Effect", String.Empty, String.Empty, 0f, 0f, 3f, false, null, null, null); + Params[10015] = new VisualParam(10015, "Belly_Physics_UpDown_Spring", 0, "physics", "Belly Physics UpDown Spring", String.Empty, String.Empty, 10f, 0f, 100f, false, null, null, null); + Params[10016] = new VisualParam(10016, "Belly_Physics_UpDown_Gain", 0, "physics", "Belly Physics UpDown Gain", String.Empty, String.Empty, 10f, 1f, 100f, false, null, null, null); + Params[10017] = new VisualParam(10017, "Belly_Physics_UpDown_Damping", 0, "physics", "Belly Physics UpDown Damping", String.Empty, String.Empty, 0.2f, 0f, 1f, false, null, null, null); + Params[10018] = new VisualParam(10018, "Butt_Physics_Mass", 0, "physics", "Butt Physics Mass", String.Empty, String.Empty, 0.1f, 0.1f, 1f, false, null, null, null); + Params[10019] = new VisualParam(10019, "Butt_Physics_Gravity", 0, "physics", "Butt Physics Gravity", String.Empty, String.Empty, 0f, 0f, 30f, false, null, null, null); + Params[10020] = new VisualParam(10020, "Butt_Physics_Drag", 0, "physics", "Butt Physics Drag", String.Empty, String.Empty, 1f, 0f, 10f, false, null, null, null); + Params[10021] = new VisualParam(10021, "Butt_Physics_UpDown_Max_Effect", 0, "physics", "Butt Physics UpDown Max Effect", String.Empty, String.Empty, 0f, 0f, 3f, false, null, null, null); + Params[10022] = new VisualParam(10022, "Butt_Physics_UpDown_Spring", 0, "physics", "Butt Physics UpDown Spring", String.Empty, String.Empty, 10f, 0f, 100f, false, null, null, null); + Params[10023] = new VisualParam(10023, "Butt_Physics_UpDown_Gain", 0, "physics", "Butt Physics UpDown Gain", String.Empty, String.Empty, 10f, 1f, 100f, false, null, null, null); + Params[10024] = new VisualParam(10024, "Butt_Physics_UpDown_Damping", 0, "physics", "Butt Physics UpDown Damping", String.Empty, String.Empty, 0.2f, 0f, 1f, false, null, null, null); + Params[10025] = new VisualParam(10025, "Butt_Physics_LeftRight_Max_Effect", 0, "physics", "Butt Physics LeftRight Max Effect", String.Empty, String.Empty, 0f, 0f, 3f, false, null, null, null); + Params[10026] = new VisualParam(10026, "Butt_Physics_LeftRight_Spring", 0, "physics", "Butt Physics LeftRight Spring", String.Empty, String.Empty, 10f, 0f, 100f, false, null, null, null); + Params[10027] = new VisualParam(10027, "Butt_Physics_LeftRight_Gain", 0, "physics", "Butt Physics LeftRight Gain", String.Empty, String.Empty, 10f, 1f, 100f, false, null, null, null); + Params[10028] = new VisualParam(10028, "Butt_Physics_LeftRight_Damping", 0, "physics", "Butt Physics LeftRight Damping", String.Empty, String.Empty, 0.2f, 0f, 1f, false, null, null, null); + Params[10029] = new VisualParam(10029, "Breast_Physics_LeftRight_Max_Effect", 0, "physics", "Breast Physics LeftRight Max Effect", String.Empty, String.Empty, 0f, 0f, 3f, false, null, null, null); + Params[10030] = new VisualParam(10030, "Breast_Physics_LeftRight_Spring", 0, "physics", "Breast Physics LeftRight Spring", String.Empty, String.Empty, 10f, 0f, 100f, false, null, null, null); + Params[10031] = new VisualParam(10031, "Breast_Physics_LeftRight_Gain", 0, "physics", "Breast Physics LeftRight Gain", String.Empty, String.Empty, 10f, 1f, 100f, false, null, null, null); + Params[10032] = new VisualParam(10032, "Breast_Physics_LeftRight_Damping", 0, "physics", "Breast Physics LeftRight Damping", String.Empty, String.Empty, 0.2f, 0f, 1f, false, null, null, null); } } } diff --git a/OpenMetaverseTypes/Enums.cs b/OpenMetaverseTypes/Enums.cs index 51b85eef..9d3fcf7d 100644 --- a/OpenMetaverseTypes/Enums.cs +++ b/OpenMetaverseTypes/Enums.cs @@ -240,6 +240,8 @@ namespace OpenMetaverse Alpha, /// Tattoo Tattoo, + /// Physics + Physics, /// Invalid wearable asset Invalid = 255 }; diff --git a/Programs/VisualParamGenerator/VisualParamGenerator.cs b/Programs/VisualParamGenerator/VisualParamGenerator.cs index 2e94364a..cb88ed19 100644 --- a/Programs/VisualParamGenerator/VisualParamGenerator.cs +++ b/Programs/VisualParamGenerator/VisualParamGenerator.cs @@ -81,7 +81,7 @@ namespace VisualParamGenerator StringWriter output = new StringWriter(); - // Make sure we end up with 218 Group-0 VisualParams as a sanity check + // Make sure we end up with 251 Group-0 VisualParams as a sanity check int count = 0; foreach (XmlNode node in list) @@ -287,7 +287,7 @@ namespace VisualParamGenerator } } - if (count != 218) + if (count != 251) { Console.WriteLine("Ended up with the wrong number of Group-0 VisualParams! Exiting..."); return; diff --git a/Programs/examples/GridAccountant/frmGridAccountant.cs b/Programs/examples/GridAccountant/frmGridAccountant.cs index 652cd03b..77e8d9b3 100644 --- a/Programs/examples/GridAccountant/frmGridAccountant.cs +++ b/Programs/examples/GridAccountant/frmGridAccountant.cs @@ -415,9 +415,9 @@ namespace GridAccountant // AgentSetAppearance AgentSetAppearancePacket appearance = new AgentSetAppearancePacket(); - appearance.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[218]; + appearance.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[251]; // Setup some random appearance values - for (int i = 0; i < 218; i++) + for (int i = 0; i < 251; i++) { appearance.VisualParam[i] = new AgentSetAppearancePacket.VisualParamBlock(); appearance.VisualParam[i].ParamValue = (byte)rand.Next(255); diff --git a/bin/openmetaverse_data/avatar_lad.xml b/bin/openmetaverse_data/avatar_lad.xml index 204b69cf..3bd7ba72 100644 --- a/bin/openmetaverse_data/avatar_lad.xml +++ b/bin/openmetaverse_data/avatar_lad.xml @@ -612,7 +612,7 @@ id="36" group="0" name="Shoulders" - label="Shoulders" + label="Shoulders" wearable="shape" edit_group="shape_torso" edit_group_order="4" @@ -4040,7 +4040,6 @@ scale="0.0 0.0 0.01" pos="0 0 -0.01"/> - - + - + + + + + + + + + + + + + + + + + + + + @@ -4828,9 +4886,54 @@ + + + + + + + + + + + + + + + + + + + + + name="head_tattoo"> + + + + + + + + + + + + + + + + + + + + + + + + @@ -6745,6 +6921,61 @@ render_pass="bump"> name="upper_tattoo"> + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7942,6 +8173,61 @@ render_pass="bump"> name="lower_tattoo"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +