Fix for <Item type="None" /> appearing in drawable XML

This commit is contained in:
dexy 2022-01-08 17:40:34 +11:00
parent d6039e87ab
commit 8ea3327810
3 changed files with 9 additions and 3 deletions

View File

@ -466,7 +466,7 @@ namespace CodeWalker.GameFiles
{
if (b == null)
{
YbnXml.SelfClosingTag(sb, indent, "Item type=\"" + BoundsType.None.ToString() + "\"");
YbnXml.SelfClosingTag(sb, indent, name + " type=\"" + BoundsType.None.ToString() + "\"");
}
else
{

View File

@ -5560,7 +5560,10 @@ namespace CodeWalker.GameFiles
{
YdrXml.StringTag(sb, indent, "Name", YdrXml.XmlEscape(Name));
base.WriteXml(sb, indent, ddsfolder);
Bounds.WriteXmlNode(Bound, sb, indent);
if (Bound != null)
{
Bounds.WriteXmlNode(Bound, sb, indent);
}
if (LightAttributes?.data_items != null)
{
YdrXml.WriteItemArray(sb, LightAttributes.data_items, indent, "Lights");

View File

@ -949,7 +949,10 @@ namespace CodeWalker.GameFiles
base.WriteXml(sb, indent, ddsfolder);
Bounds.WriteXmlNode(Bound, sb, indent);
if (Bound != null)
{
Bounds.WriteXmlNode(Bound, sb, indent);
}
Skeleton = skel;
Bound = bnds;