]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_edict.c
now entirely dynamic OpenGL binding
[xonotic/darkplaces.git] / pr_edict.c
index 23a05d1f95b6864c63d289f4733a753b2788d903..bf351309ad331e3b39617e44ffb227ea7fb9e128 100644 (file)
@@ -171,7 +171,7 @@ void FindEdictFieldOffsets(void)
        SV_PlayerPhysicsQC = ED_FindFunction ("SV_PlayerPhysics");
        // LordHavoc: support for endframe
        EndFrameQC = ED_FindFunction ("EndFrame");
-};
+}
 
 /*
 =================
@@ -350,39 +350,6 @@ dfunction_t *ED_FindFunction (char *name)
 }
 
 
-/*
-eval_t *GetEdictFieldValue(edict_t *ed, char *field)
-{
-       ddef_t                  *def = NULL;
-       int                             i;
-       static int              rep = 0;
-
-       for (i=0 ; i<GEFV_CACHESIZE ; i++)
-       {
-               if (!strcmp(field, gefvCache[i].field))
-               {
-                       def = gefvCache[i].pcache;
-                       goto Done;
-               }
-       }
-
-       def = ED_FindField (field);
-
-       if (strlen(field) < MAX_FIELD_LEN)
-       {
-               gefvCache[rep].pcache = def;
-               strcpy (gefvCache[rep].field, field);
-               rep ^= 1;
-       }
-
-Done:
-       if (!def)
-               return NULL;
-
-       return (eval_t *)((char *)&ed->v + def->ofs*4);
-}
-*/
-
 /*
 ============
 PR_ValueString
@@ -533,7 +500,7 @@ char *PR_GlobalString (int ofs)
        val = (void *)&pr_globals[ofs];
        def = ED_GlobalAtOfs(ofs);
        if (!def)
-               sprintf (line,"%i(\?\?\?)", ofs); // LordHavoc: escaping the ?s so it is not a trigraph
+               sprintf (line,"%i(?)", ofs);
        else
        {
                s = PR_ValueString (def->type, val);
@@ -556,7 +523,7 @@ char *PR_GlobalStringNoContents (int ofs)
 
        def = ED_GlobalAtOfs(ofs);
        if (!def)
-               sprintf (line,"%i(\?\?\?)", ofs); // LordHavoc: escaping the ?s so it is not a trigraph
+               sprintf (line,"%i(?)", ofs);
        else
                sprintf (line,"%i(%s)", ofs, pr_strings + def->s_name);
 
@@ -1495,14 +1462,6 @@ edict_t *EDICT_NUM_ERROR(int n)
        Host_Error ("EDICT_NUM: bad number %i", n);
        return NULL;
 }
-/*
-edict_t *EDICT_NUM(int n)
-{
-       if (n < 0 || n >= sv.max_edicts)
-               Sys_Error ("EDICT_NUM: bad number %i", n);
-       return (edict_t *)((qbyte *)sv.edicts+ (n)*pr_edict_size);
-}
-*/
 
 int NUM_FOR_EDICT(edict_t *e)
 {
@@ -1524,3 +1483,4 @@ int NoCrash_NUM_FOR_EDICT(edict_t *e)
        b = b / pr_edict_size;
        return b;
 }
+