From: divverent Date: Wed, 23 Mar 2011 19:57:52 +0000 (+0000) Subject: fix PRVM error and warning backtrace display X-Git-Tag: xonotic-v0.5.0~372 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=802d7ce31923e564492b61297e862198544108d7;p=xonotic%2Fdarkplaces.git fix PRVM error and warning backtrace display git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10961 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=696df68aa50e287762e431cf89450be641599083 --- diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 1f8bbc62..719224d0 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -1,10 +1,12 @@ #ifdef PRVMTIMEPROFILING #define PreError() \ + prog->xstatement = st - prog->statements; \ tm = Sys_DoubleTime(); \ prog->xfunction->profile += (st - startst); \ prog->xfunction->tprofile += (tm - starttm); #else #define PreError() \ + prog->xstatement = st - prog->statements; \ prog->xfunction->profile += (st - startst); #endif @@ -167,7 +169,10 @@ goto cleanup; } if (OPB->_int < prog->progs->entityfields && !prog->allowworldwrites) + { + prog->xstatement = st - prog->statements; VM_Warning("assignment to world.%s (field %i) in %s\n", PRVM_GetString(PRVM_ED_FieldAtOfs(OPB->_int)->s_name), OPB->_int, PRVM_NAME); + } ptr = (prvm_eval_t *)(prog->edictsfields + OPB->_int); ptr->_int = OPA->_int; break; @@ -179,7 +184,10 @@ goto cleanup; } if (OPB->_int < prog->progs->entityfields && !prog->allowworldwrites) + { + prog->xstatement = st - prog->statements; VM_Warning("assignment to world.%s (field %i) in %s\n", PRVM_GetString(PRVM_ED_FieldAtOfs(OPB->_int)->s_name), OPB->_int, PRVM_NAME); + } ptr = (prvm_eval_t *)(prog->edictsfields + OPB->_int); ptr->ivector[0] = OPA->ivector[0]; ptr->ivector[1] = OPA->ivector[1];