dexyfex / CodeWalker

https://www.gta5-mods.com/tools/codewalker-gtav-interactive-3d-map
469 stars 205 forks source link

[BUG] When parsing XML, comments are incorrectly recognized as empty or incomplete data #179

Open jag3dagster opened 1 year ago

jag3dagster commented 1 year ago

Description I've noticed when importing pso.xml files, any comments that were in the xml file are incorrectly parsed as empty or incomplete data. I assume this extends beyond the ymt.pso.xml file type that I've been working with, but I have not tested beyond that file type.

Pre-import ymt.pso.xml

Post-import ymt

Expected Comments are ignored when importing xml files back into codewalker

Actual Comments are considered empty or incomplete data

Repro Steps

  1. Import a file of type .ymt.pso.xml with the following content
    <?xml version="1.0" encoding="UTF-8"?>
    <naOcclusionInteriorMetadata>
    <PortalInfoList itemType="naOcclusionPortalInfoMetadata">
    <!-- (0) Door - 0 limbo -> 5 garage -->
    <Item>
      <InteriorProxyHash value="-263874531"/>
      <PortalIdx value="0"/>
      <RoomIdx value="0"/>
      <DestInteriorHash value="-263874531"/>
      <DestRoomIdx value="5"/>
      <PortalEntityList itemType="naOcclusionPortalEntityMetadata">
        <Item>
          <LinkType value="1"/>
          <MaxOcclusion value="0.8"/>
          <EntityModelHashkey value="130864445"/>
          <IsDoor value="true"/>
          <IsGlass value="false"/>
        </Item>
      </PortalEntityList>
    </Item>
    </PortalInfoList>
    </naOcclusionInteriorMetadata>
  2. Reopen the imported .ymt file and observe the additional <Item> tag with default data in it.