X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=prvm_execprogram.h;h=064054e847e673cd8d098912792d7570b3155f9f;hb=f71636b5b494dda04c4fd29158eabc89f5eeaa55;hp=10549bcfc33d6a01bc7c6a4f1e68c55ce10136be;hpb=5fbf1b000aeab4cc583f562a35cf0dddef63aa52;p=xonotic%2Fdarkplaces.git diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 10549bcf..064054e8 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -243,12 +243,14 @@ 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; @@ -258,12 +260,14 @@ 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; @@ -271,12 +275,14 @@ 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: @@ -306,7 +312,7 @@ 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); @@ -333,10 +339,10 @@ case OP_STATE: if(prog->flag & PRVM_OP_STATE) { - ed = PRVM_PROG_TO_EDICT(PRVM_GETGLOBALFIELDVALUE(prog->globaloffsets.self)->edict); - PRVM_GETEDICTFIELDVALUE(ed,prog->fieldoffsets.nextthink)->_float = PRVM_GETGLOBALFIELDVALUE(prog->globaloffsets.time)->_float + 0.1; - PRVM_GETEDICTFIELDVALUE(ed,prog->fieldoffsets.frame)->_float = OPA->_float; - PRVM_GETEDICTFIELDVALUE(ed,prog->fieldoffsets.think)->function = OPB->function; + ed = PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict); + PRVM_EDICTFIELDVALUE(ed,prog->fieldoffsets.nextthink)->_float = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.time)->_float + 0.1; + PRVM_EDICTFIELDVALUE(ed,prog->fieldoffsets.frame)->_float = OPA->_float; + PRVM_EDICTFIELDVALUE(ed,prog->fieldoffsets.think)->function = OPB->function; } else {