]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
-Fixed an old qc bug that's already been existing in the original quake
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Nov 2004 20:43:28 +0000 (20:43 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Nov 2004 20:43:28 +0000 (20:43 +0000)
 (- 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

pr_edict.c
prvm_cmds.c
prvm_edict.c

index 0e8fbc6db55d805ba03db37a742a44e3ca2c1a59..bbfd1e4d1950847e10b0befa27ba5deb661a47cd 100644 (file)
@@ -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:
index b6c6b16c89628d4f16cfc637183eb41d1c65fcb9..56c9f4bc8d1572d6bb69830c2f860b972f2ad7f0 100644 (file)
@@ -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);
index 6fe41fa02edde45843f2a97c8ec55597bbf2153f..d3c5bbd2b35fc4ab4c7732cc5cc83da7cb99489b 100644 (file)
@@ -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"))