]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_execprogram.h
improved r_shadows mode, new cvars for better use with overhead camera mods:
[xonotic/darkplaces.git] / prvm_execprogram.h
index 97bf15d729d5838ca67b65f9fd82a0547be1f09b..52da1343afc1f36a3a446c4824da653aef4b9c7f 100644 (file)
                                OPC->_float = OPA->_float < OPB->_float;
                                break;
                        case OP_AND:
-                               OPC->_float = OPA->_float && OPB->_float;
+                               OPC->_float = FLOAT_IS_TRUE_FOR_INT(OPA->_int) && FLOAT_IS_TRUE_FOR_INT(OPB->_int); // TODO change this back to float, and add AND_I to be used by fteqcc for anything not a float
                                break;
                        case OP_OR:
-                               OPC->_float = OPA->_float || OPB->_float;
+                               OPC->_float = FLOAT_IS_TRUE_FOR_INT(OPA->_int) || FLOAT_IS_TRUE_FOR_INT(OPB->_int); // TODO change this back to float, and add OR_I to be used by fteqcc for anything not a float
                                break;
                        case OP_NOT_F:
-                               OPC->_float = !OPA->_float;
+                               OPC->_float = !FLOAT_IS_TRUE_FOR_INT(OPA->_int);
                                break;
                        case OP_NOT_V:
                                OPC->_float = !OPA->vector[0] && !OPA->vector[1] && !OPA->vector[2];
                //==================
 
                        case OP_IFNOT:
-                               if (!OPA->_float)
-                               // TODO add an "int-ifnot"
+                               if(!FLOAT_IS_TRUE_FOR_INT(OPA->_int))
+                               // TODO add an "int-if", and change this one to OPA->_float
                                // although mostly unneeded, thanks to the only float being false being 0x0 and 0x80000000 (negative zero)
                                // and entity, string, field values can never have that value
                                {
                                break;
 
                        case OP_IF:
-                               if (OPA->_float)
-                               // TODO add an "int-if"
+                               if(FLOAT_IS_TRUE_FOR_INT(OPA->_int))
+                               // TODO add an "int-if", and change this one, as well as the FLOAT_IS_TRUE_FOR_INT usages, to OPA->_float
                                // although mostly unneeded, thanks to the only float being false being 0x0 and 0x80000000 (negative zero)
                                // and entity, string, field values can never have that value
                                {