[Gtkradiant] pico may detect .lwo as .obj

Rudolf Polzer divverent at googlemail.com
Tue Feb 14 04:07:07 EST 2012


On Mon, Feb 13, 2012 at 05:13:10PM -0800, James Canete wrote:
> 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

This is funny, GtkRadiant 1.5 had this very fix for ages already.

Best regards,

Rudolf Polzer


More information about the Gtkradiant mailing list