Dylancyclone / VMF2OBJ

Convert source-engine VMF files into OBJ files with materials (including brushes, displacements, entities, and models)
MIT License
113 stars 7 forks source link

Handle empty VMF keys and also allow '@' symbol in VMF keys #31

Closed PorkMuncher closed 2 years ago

PorkMuncher commented 2 years ago

Handling some weirdness for some HL2 maps when decompiled with VMEX. Some VMF files contain empty keys (for example d1_town_01) and some others contain '@' symbol in the VMF keys (for example d1_town_02). This resulted in an invalid JSON when parsed and the application crashed.

PorkMuncher commented 2 years ago

Also attaching VMF files where this can be seen. example-vmf.zip

To see the unusual keys Ctrl+F and type "" or @"

Dylancyclone commented 2 years ago

Hello! Sorry about the delay, and thank you for the contribution! I agree that the @ symbol is causing problems (and I see no documentation on it so it looks like it should be removed). I'm going to quickly update the PR so that the @ is simply removed so that the resulting key appears as it should, then merge it in

Dylancyclone commented 2 years ago

Thank you again!