From: black Date: Mon, 29 Nov 2004 20:43:28 +0000 (+0000) Subject: -Fixed an old qc bug that's already been existing in the original quake X-Git-Tag: xonotic-v0.1.0preview~5338 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=35f9539e8d4b4d9a6875a2834aac5736193b5aee;ds=sidebyside -Fixed an old qc bug that's already been existing in the original quake (- hopefully it is a bug): ParseEpair was accessing the globals arrays instead of writing an offset directly into the value. -Removed the VM_CheckEmptyString from VM_drawstring. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4798 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/pr_edict.c b/pr_edict.c index 0e8fbc6d..bbfd1e4d 100644 --- a/pr_edict.c +++ b/pr_edict.c @@ -983,7 +983,8 @@ qboolean ED_ParseEpair(edict_t *ent, ddef_t *key, const char *s) Con_DPrintf("ED_ParseEpair: Can't find field %s\n", s); return false; } - val->_int = G_INT(def->ofs); + //val->_int = G_INT(def->ofs); AK Please check this - seems to be an org. quake bug + val->_int = def->ofs; break; case ev_function: diff --git a/prvm_cmds.c b/prvm_cmds.c index b6c6b16c..56c9f4bc 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -2642,7 +2642,7 @@ void VM_drawstring(void) return; } - VM_CheckEmptyString(string); + //VM_CheckEmptyString(string); Why should it be checked - perhaps the menu wants to the precolored letters, too? pos = PRVM_G_VECTOR(OFS_PARM0); scale = PRVM_G_VECTOR(OFS_PARM2); diff --git a/prvm_edict.c b/prvm_edict.c index 6fe41fa0..d3c5bbd2 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -965,7 +965,7 @@ qboolean PRVM_ED_ParseEpair(prvm_edict_t *ent, ddef_t *key, const char *s) Con_DPrintf("PRVM_ED_ParseEpair: Can't find field %s in %s\n", s, PRVM_NAME); return false; } - val->_int = PRVM_G_INT(def->ofs); + val->_int = def->ofs; break; case ev_function: @@ -1483,7 +1483,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required prog->self = PRVM_ED_FindGlobal("self"); - if(PRVM_ED_FindGlobal("time")) + if( PRVM_ED_FindGlobal("time") && PRVM_ED_FindGlobal("time")->type == ev_float ) prog->time = &PRVM_G_FLOAT(PRVM_ED_FindGlobal("time")->ofs); if(PRVM_ED_FindField ("chain"))