]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_execprogram.h
Deduct frame execution time from sleep time
[xonotic/darkplaces.git] / prvm_execprogram.h
index 988e913a7b2b525692f5cc1e0b27e496744e6063..99a8990688682f4b87b44ffd5cf3a74b90fc3365 100644 (file)
@@ -377,11 +377,8 @@ int i;
                                }
                                else
                                {
-                                       if (developer.integer)
-                                       {
-                                               PRE_ERROR();
-                                               VM_Warning(prog, "Attempted division by zero in %s\n", prog->name );
-                                       }
+                                       PRE_ERROR();
+                                       VM_Warning(prog, "Attempted division of %f by zero\n", OPA->_float);
                                        OPC->_float = 0.0f;
                                }
                                DISPATCH_OPCODE();
@@ -404,13 +401,13 @@ int i;
                                OPC->_float = OPA->_float < OPB->_float;
                                DISPATCH_OPCODE();
                        HANDLE_OPCODE(OP_AND):
-                               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
+                               OPC->_float = PRVM_FLOAT_IS_TRUE_FOR_INT(OPA->_int) && PRVM_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
                                DISPATCH_OPCODE();
                        HANDLE_OPCODE(OP_OR):
-                               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
+                               OPC->_float = PRVM_FLOAT_IS_TRUE_FOR_INT(OPA->_int) || PRVM_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
                                DISPATCH_OPCODE();
                        HANDLE_OPCODE(OP_NOT_F):
-                               OPC->_float = !FLOAT_IS_TRUE_FOR_INT(OPA->_int);
+                               OPC->_float = !PRVM_FLOAT_IS_TRUE_FOR_INT(OPA->_int);
                                DISPATCH_OPCODE();
                        HANDLE_OPCODE(OP_NOT_V):
                                OPC->_float = !OPA->vector[0] && !OPA->vector[1] && !OPA->vector[2];