by Spike » Wed Mar 18, 2009 1:41 am
Blame your qcc.
if ((visible (tgt)) && (infront (tgt)))
will expand into:
storeent tgt->ofs_parm0
call1 visible
storeent tgt->ofs_parm0
call1 infront
and ofs_ret, ofs_ret -> temp <- here!!!
ifnot temp, jump over
qc functions store into an invisible global for their return value. The same one for every function.
Chances are, your 'infront' function call is clobbering the return value of 'visible'.
Solutions: use FrikQCC or a recent FTEQCC. Some older fteqcc builds have issues here, but the recent ones should be fine.
Or maybe I'm going crazy. I really have no idea any more.
.