]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_execprogram.h
laying the groundwork for zpass shadow volume support (slightly faster
[xonotic/darkplaces.git] / prvm_execprogram.h
index 6b7018c12e284774a35f0866914ac5c3c1654083..064054e847e673cd8d098912792d7570b3155f9f 100644 (file)
                                        prog->xfunction->profile += (st - startst);
                                        st += st->b - 1;        // offset the s++
                                        startst = st;
+#if PRVMRUNAWAYCHECK
                                        if (++jumpcount == 10000000)
                                        {
                                                prog->xstatement = st - prog->statements;
                                                PRVM_Profile(1<<30, 1000000);
                                                PRVM_ERROR("%s runaway loop counter hit limit of %d jumps\ntip: read above for list of most-executed functions", PRVM_NAME, jumpcount);
                                        }
+#endif
                                }
                                break;
 
                                        prog->xfunction->profile += (st - startst);
                                        st += st->b - 1;        // offset the s++
                                        startst = st;
+#if PRVMRUNAWAYCHECK
                                        if (++jumpcount == 10000000)
                                        {
                                                prog->xstatement = st - prog->statements;
                                                PRVM_Profile(1<<30, 1000000);
                                                PRVM_ERROR("%s runaway loop counter hit limit of %d jumps\ntip: read above for list of most-executed functions", PRVM_NAME, jumpcount);
                                        }
+#endif
                                }
                                break;
 
                                prog->xfunction->profile += (st - startst);
                                st += st->a - 1;        // offset the s++
                                startst = st;
+#if PRVMRUNAWAYCHECK
                                if (++jumpcount == 10000000)
                                {
                                        prog->xstatement = st - prog->statements;
                                        PRVM_Profile(1<<30, 1000000);
                                        PRVM_ERROR("%s runaway loop counter hit limit of %d jumps\ntip: read above for list of most-executed functions", PRVM_NAME, jumpcount);
                                }
+#endif
                                break;
 
                        case OP_CALL0:
                                        if (builtinnumber < prog->numbuiltins && prog->builtins[builtinnumber])
                                                prog->builtins[builtinnumber]();
                                        else
-                                               PRVM_ERROR("No such builtin #%i in %s", builtinnumber, PRVM_NAME);
+                                               PRVM_ERROR("No such builtin #%i in %s; most likely cause: outdated engine build. Try updating!", builtinnumber, PRVM_NAME);
                                }
                                else
                                        st = prog->statements + PRVM_EnterFunction(newf);