Metapyziks / SourceUtils

Source engine file format exporting / WebGL map viewer demo.
MIT License
144 stars 19 forks source link

StaticPropV10 size should be 72 #63

Open cr4yz opened 5 years ago

cr4yz commented 5 years ago

https://github.com/Metapyziks/SourceUtils/blob/da700ca048c9aed3058b4048c6521d7666dd7fbb/SourceUtils/ValveBsp/StaticProps.cs#L113

Had some issues reading props, size here should be 72

edit: this is the map I tested with, it's using v10 https://gamebanana.com/maps/188524

Metapyziks commented 5 years ago

Thanks for reporting!

Metapyziks commented 5 years ago

Ah to complicate things a bit, this map is also v10 but only works with Size=76 😕 https://steamcommunity.com/sharedfiles/filedetails/?id=1667954510

cr4yz commented 5 years ago

I checked out bspsrc and it looks like csgo is a special case, 76 for v10 and 80 for v11.

https://github.com/ata4/bspsrc/blob/ddc92cf9979b3e9f39a625e0ecfa963edce7071d/src/main/java/info/ata4/bsplib/BspFileReader.java#L366

edit: I hacked in a fix that checks if the bsp Version is 21, since I only plan on loading CS:S and CS:GO maps this will work for me. For a complete solution looks like it'll need to determine if the map is specifically for CS:GO, since other games with version 21 don't use the same struct

Metapyziks commented 5 years ago

I've used that as a workaround too, maybe we'll figure out a better way to detect CS:GO maps later.

cr4yz commented 5 years ago

Cool, thanks for the update :)