[Gtkradiant] pico may detect .lwo as .obj

James Canete smiletheory at gmail.com
Mon Feb 13 20:13:10 EST 2012


So there's a bug where q3map2 won't properly load specific .lwo files, and
I've tracked down its cause and wrote a workaround.

The function _obj_canload() in libs/picomodel/pm_obj.c passes files that
aren't Wavefront ASCII.   Its check consists of looking for single
recognizable tokens at the start of lines such as "v " and "g ", and can
false positive.  This function is called before checking if the file is a
.lwo file, which can cause pico to try to load it as an .obj, leading to
the model not appearing in the final BSP.

A proper fix would be to rewrite the check so it doesn't false positive,
but for now an easy workaround is to change the order in which the model
modules are tested, like so:

http://pastebin.com/z7MvPsgs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/gtkradiant/attachments/20120213/a5252a47/attachment.htm>


More information about the Gtkradiant mailing list