X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_main.c;h=3a238c3ffa40d5340b244fc704f74d949c2fc2d4;hb=36b24254478cf1c5087e4fea5827613aa145d26f;hp=c483a33717d87cb17db3124b1bc2887122b108f0;hpb=eb35bb76a4704ec05030b29548b2691ca3dee6d5;p=xonotic%2Fdarkplaces.git diff --git a/cl_main.c b/cl_main.c index c483a337..3a238c3f 100644 --- a/cl_main.c +++ b/cl_main.c @@ -473,7 +473,7 @@ static void CL_RelinkStaticEntities(void) CL_RelinkEntities =============== */ -static void CL_RelinkNetworkEntities() +static void CL_RelinkNetworkEntities(void) { entity_t *ent; int i, effects, temp; @@ -546,6 +546,8 @@ static void CL_RelinkNetworkEntities() VectorCopy (neworg, ent->render.origin); ent->render.flags = ent->state_current.flags; + if (i == cl.viewentity) + ent->render.flags |= RENDER_EXTERIORMODEL; ent->render.effects = effects = ent->state_current.effects; if (ent->state_current.flags & RENDER_COLORMAPPED) ent->render.colormap = ent->state_current.colormap; @@ -707,7 +709,7 @@ static void CL_RelinkNetworkEntities() { // * 4 for the expansion from 0-255 to 0-1023 range, // / 255 to scale down byte colors - VectorMA(dlightcolor, ent->state_current.glowsize * (4.0f / 255.0f), (qbyte *)&d_8to24table[ent->state_current.glowcolor], dlightcolor); + VectorMA(dlightcolor, ent->state_current.glowsize * (4.0f / 255.0f), (qbyte *)&palette_complete[ent->state_current.glowcolor], dlightcolor); } // LordHavoc: customizable trail if (ent->render.flags & RENDER_GLOWTRAIL) @@ -717,21 +719,13 @@ static void CL_RelinkNetworkEntities() { VectorCopy(neworg, v); // hack to make glowing player light shine on their gun - if (i == cl.viewentity && !chase_active.integer) + if (i == cl.viewentity/* && !chase_active.integer*/) v[2] += 30; CL_AllocDlight (&ent->render, v, 1, dlightcolor[0], dlightcolor[1], dlightcolor[2], 0, 0); } - if (chase_active.integer) - { - if (ent->render.flags & RENDER_VIEWMODEL) - continue; - } - else - { - if (i == cl.viewentity || (ent->render.flags & RENDER_EXTERIORMODEL)) - continue; - } + if (chase_active.integer && (ent->render.flags & RENDER_VIEWMODEL)) + continue; // don't show entities with no modelindex (note: this still shows // entities which have a modelindex that resolved to a NULL model) @@ -777,7 +771,7 @@ void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float } } -static void CL_RelinkEffects() +static void CL_RelinkEffects(void) { int i, intframe; cl_effect_t *e;