diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index fcae8eada..6cd7fb5fc 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -1628,12 +1628,16 @@ void CL_LinkPacketEntities (void) && (gl_nocolors.value == -1 || (ent->model/* && state->modelindex == cl_playerindex*/))) { // TODO: DP colormap/colormod extension? +#ifdef SWQUAKE ent->palremap = cl.players[state->colormap-1].palremap; +#endif ent->scoreboard = &cl.players[state->colormap-1]; } else { +#ifdef SWQUAKE ent->palremap = D_IdentityRemap(); +#endif ent->scoreboard = NULL; } @@ -2197,7 +2201,9 @@ void CL_LinkProjectiles (void) ent->skinnum = 0; ent->frame = 0; ent->flags = 0; +#ifdef SWQUAKE ent->palremap = D_IdentityRemap(); +#endif ent->scoreboard = NULL; #ifdef PEXT_SCALE ent->scale = 1; @@ -2718,7 +2724,9 @@ void CL_LinkPlayers (void) else ent->lerpfrac = 0; +#ifdef SWQUAKE ent->palremap = info->palremap; +#endif if (state->modelindex == cl_playerindex) ent->scoreboard = info; // use custom skin else diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 1b65fca8f..f66618293 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -2230,7 +2230,9 @@ void CL_ParseStatic (int version) // copy it to the current state ent->model = cl.model_precache[es.modelindex]; ent->oldframe = ent->frame = es.frame; +#ifdef SWQUAKE ent->palremap = D_IdentityRemap(); +#endif ent->skinnum = es.skinnum; ent->drawflags = es.hexen2flags; diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index fb9081fb8..2cc8f51cf 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -2311,7 +2311,9 @@ entity_t *CL_NewTempEntity (void) memset (ent, 0, sizeof(*ent)); +#ifdef SWQUAKE ent->palremap = D_IdentityRemap(); +#endif #ifdef PEXT_SCALE ent->scale = 1; #endif diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index acc22cfc4..a5b939e94 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -716,7 +716,9 @@ static qboolean CopyCSQCEdictToEntity(csqcedict_t *in, entity_t *out) if (in->v->colormap > 0 && in->v->colormap <= MAX_CLIENTS) { +#ifdef SWQUAKE out->palremap = cl.players[(int)in->v->colormap-1].palremap; +#endif out->scoreboard = &cl.players[(int)in->v->colormap-1]; } // TODO: DP COLORMAP extension? diff --git a/engine/client/render.h b/engine/client/render.h index b2cd47d8b..c77cdc664 100644 --- a/engine/client/render.h +++ b/engine/client/render.h @@ -67,7 +67,6 @@ typedef struct entity_s struct model_s *model; // NULL = no model int frame; - struct palremap_s *palremap; int skinnum; // for Alias models struct player_info_s *scoreboard; // identify player @@ -112,6 +111,9 @@ typedef struct entity_s #ifdef PEXT_HEXEN2 int drawflags; int abslight; +#endif +#ifdef SWQUAKE + struct palremap_s *palremap; #endif float lerpfrac; int oldframe; diff --git a/engine/client/renderer.c b/engine/client/renderer.c index 1cbc18c86..3f12a5911 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -1661,7 +1661,9 @@ TRACE(("dbg: R_ApplyRenderer: efrags\n")); for (i = 0; i < cl.num_statics; i++) //make the static entities reappear. { cl_static_entities[i].model = cl.model_precache[staticmodelindex[i]]; +#ifdef SWQUAKE cl_static_entities[i].palremap = D_IdentityRemap(); +#endif if (staticmodelindex[i]) //make sure it's worthwhile. { R_AddEfrags(&cl_static_entities[i]); diff --git a/engine/client/view.c b/engine/client/view.c index ef52286ee..c57faab23 100644 --- a/engine/client/view.c +++ b/engine/client/view.c @@ -1184,7 +1184,9 @@ void V_CalcRefdef (int pnum) else view->model = cl.model_precache[cl.stats[pnum][STAT_WEAPON]]; view->frame = view_message?view_message->weaponframe:0; +#ifdef SWQUAKE view->palremap = D_IdentityRemap(); +#endif // set up the refresh position r_refdef.viewangles[PITCH] += cl.punchangle[pnum];