]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_edict.c
lighthalf related transpoly cleanup
[xonotic/darkplaces.git] / pr_edict.c
index f327bac204ebffe4230b9de2d3d6299cfac11877..93d306b6190db306f1c2080428a2fc8b1df0910f 100644 (file)
@@ -92,6 +92,8 @@ int eval_glow_color;
 int eval_items2;
 int eval_scale;
 int eval_alpha;
+int eval_renderamt; // HalfLife support
+int eval_rendermode; // HalfLife support
 int eval_fullbright;
 int eval_ammo_shells1;
 int eval_ammo_nails1;
@@ -108,6 +110,7 @@ int eval_drawonlytoclient;
 int eval_colormod;
 int eval_ping;
 int eval_movement;
+int eval_pmodel;
 
 dfunction_t *SV_PlayerPhysicsQC;
 dfunction_t *EndFrameQC;
@@ -136,6 +139,8 @@ void FindEdictFieldOffsets()
        eval_items2 = FindFieldOffset("items2");
        eval_scale = FindFieldOffset("scale");
        eval_alpha = FindFieldOffset("alpha");
+       eval_renderamt = FindFieldOffset("renderamt"); // HalfLife support
+       eval_rendermode = FindFieldOffset("rendermode"); // HalfLife support
        eval_fullbright = FindFieldOffset("fullbright");
        eval_ammo_shells1 = FindFieldOffset("ammo_shells1");
        eval_ammo_nails1 = FindFieldOffset("ammo_nails1");
@@ -152,6 +157,7 @@ void FindEdictFieldOffsets()
        eval_colormod = FindFieldOffset("colormod");
        eval_ping = FindFieldOffset("ping");
        eval_movement = FindFieldOffset("movement");
+       eval_pmodel = FindFieldOffset("pmodel");
 
        // LordHavoc: allowing QuakeC to override the player movement code
        SV_PlayerPhysicsQC = ED_FindFunction ("SV_PlayerPhysics");
@@ -201,7 +207,7 @@ edict_t *ED_Alloc (void)
        }
        
        if (i == MAX_EDICTS)
-               Sys_Error ("ED_Alloc: no free edicts");
+               Host_Error ("ED_Alloc: no free edicts");
                
        sv.num_edicts++;
        e = EDICT_NUM(i);
@@ -874,7 +880,7 @@ qboolean    ED_ParseEpair (void *base, ddef_t *key, char *s)
                if (!def)
                {
                        // LordHavoc: don't warn about worldspawn sky/fog fields because they don't require mod support
-                       if (strcmp(s, "sky") && strncmp(s, "fog_", 4) && strcmp(s, "skyboxsize"))
+                       if (strcmp(s, "sky") && strcmp(s, "fog") && strncmp(s, "fog_", 4) && strcmp(s, "farclip"))
                                Con_DPrintf ("Can't find field %s\n", s);
                        return false;
                }
@@ -1027,7 +1033,7 @@ void ED_LoadFromFile (char *data)
                if (!data)
                        break;
                if (com_token[0] != '{')
-                       Sys_Error ("ED_LoadFromFile: found %s when expecting {",com_token);
+                       Host_Error ("ED_LoadFromFile: found %s when expecting {",com_token);
 
                if (!ent)
                        ent = EDICT_NUM(0);
@@ -1317,7 +1323,7 @@ void PR_Init (void)
 // LordHavoc: turned EDICT_NUM into a #define for speed reasons
 edict_t *EDICT_NUM_ERROR(int n)
 {
-       Sys_Error ("EDICT_NUM: bad number %i", n);
+       Host_Error ("EDICT_NUM: bad number %i", n);
        return NULL;
 }
 /*
@@ -1337,6 +1343,6 @@ int NUM_FOR_EDICT(edict_t *e)
        b = b / pr_edict_size;
        
        if (b < 0 || b >= sv.num_edicts)
-               Sys_Error ("NUM_FOR_EDICT: bad pointer");
+               Host_Error ("NUM_FOR_EDICT: bad pointer");
        return b;
 }