From d6acb8bf090db8b729dcc2f0b26a40d5b105858a Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 15 Apr 2019 11:59:38 +0300 Subject: [PATCH] (9e9c1672d) The wizard now creates box colliders by default. --- .../Source/Screens/CharacterEditorScreen.cs | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Screens/CharacterEditorScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/CharacterEditorScreen.cs index 0cfc886b7..e3b266008 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/CharacterEditorScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/CharacterEditorScreen.cs @@ -4906,23 +4906,27 @@ namespace Barotrauma int width = rectInputs[2].IntValue; int height = rectInputs[3].IntValue; var colliderAttributes = new List(); - if (width == height) - { - colliderAttributes.Add(new XAttribute("radius", width / 2)); - } - else - { - if (height > width) - { - colliderAttributes.Add(new XAttribute("radius", width / 2)); - colliderAttributes.Add(new XAttribute("height", height - width)); - } - else - { - colliderAttributes.Add(new XAttribute("radius", height / 2)); - colliderAttributes.Add(new XAttribute("width", width - height)); - } - } + // Capsules/Circles + //if (width == height) + //{ + // colliderAttributes.Add(new XAttribute("radius", width / 2 * 0.85f)); + //} + //else + //{ + // if (height > width) + // { + // colliderAttributes.Add(new XAttribute("radius", width / 2 * 0.85f)); + // colliderAttributes.Add(new XAttribute("height", height - width * 0.85f)); + // } + // else + // { + // colliderAttributes.Add(new XAttribute("radius", height / 2 * 0.85f)); + // colliderAttributes.Add(new XAttribute("width", width - height * 0.85f)); + // } + //} + // Rectangles + colliderAttributes.Add(new XAttribute("height", height * 0.85f)); + colliderAttributes.Add(new XAttribute("width", width * 0.85f)); idToCodeName.TryGetValue(id, out string notes); LimbXElements.Add(id.ToString(), new XElement("limb", new XAttribute("id", id),