But that's the past now.
I can say this inherited GLQuake code does not work:
Code: Select all
if (bits & U_COLORMAP)
i = MSG_ReadByte();
else
i = ent->baseline.colormap;
if (!i)
ent->colormap = 0;
else
{
if (i > cl.maxclients)
Sys_Error ("i >= cl.maxclients");
ent->colormap = i; /* //cl.scores[i-1].translations; Baker: WinQuake only */
}
if (bits & U_SKIN)
skin = MSG_ReadByte();
else
skin = ent->baseline.skin;
if (skin != ent->skinnum) {
ent->skinnum = skin;
#ifdef SUPPORTS_COLORED_DEAD_BODIES // Baker change
if (ent->colormap > 0 && ent->colormap <= cl.maxclients)
R_TranslateNewPlayerSkin (ent->colormap - 1); //johnfitz -- was R_TranslatePlayerSkin
#else // Baker change +
if (num > 0 && num <= cl.maxclients)
R_TranslateNewPlayerSkin (num - 1); //johnfitz -- was R_TranslatePlayerSkin
#endif // Baker change -
}
This isn't the way to do it anyway, I think I'll make a nice little models/skin #/pants/shirt table and a block of 200 textures or so. I'm using the FitzQuake hacky method of not color mapping some stuff ....
Code: Select all
cvar_t r_nocolormap_list = {"r_nocolormap_list", "progs/eyes.mdl,progs/h_player.mdl,progs/gib1.mdl,progs/gib2.mdl,progs/gib3.mdl"};
...
//At level load --->
if (COM_ListMatch (r_nocolormap_list.string, mod->name) == true)
mod->flags |= MOD_NOCOLORMAP;
I'm half wondering if the existing GLQuakeish code isn't uploading stuff all the time with skin translations it doesn't need to be doing because nothing changed. CL_Parse is written a bit crappily.