]> icculus.org git repositories - divverent/darkplaces.git/commit
experimental change: do a float compare for OP_IF and OP_IFNOT, so negative
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 14 Aug 2009 19:39:24 +0000 (19:39 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 14 Aug 2009 19:39:24 +0000 (19:39 +0000)
commitdee17d020970e0a0ac99874899aa4bf406f918a5
tree65762e4d980f5a19ee82f2851dd9f4a9f1817a3b
parentd05ade804ec1789157049868deef2fc1aa09f45f
experimental change: do a float compare for OP_IF and OP_IFNOT, so negative
zero float value counts as false. No other value in QC can have the bit pattern
0x80000000 as long as no int type is added.

I have verified that the only false floats on x86_64 and i386 are 0 and
0x80000000.  However, this may fail on other platforms! (but then, OR_F and
others would also fail in some cases, as fteqcc also uses it for "float ||
entity").

When an "int" type is introduced, we'll need a new IF_I and IFNOT_I instruction
as then this would REALLY have a bad impact.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9113 d7cf8633-e32d-0410-b094-e92efae38249
prvm_execprogram.h