mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 00:10:40 +00:00
Gut most of the old skin code.
Custom skins are smashed on most targets. Player colors don't work, etc. However, this will let me do a much cleaner implementation.
This commit is contained in:
parent
61c127abc0
commit
7bfddd7ffe
36 changed files with 207 additions and 1264 deletions
|
@ -202,13 +202,13 @@ CL_TransformEntity (entity_t *ent, const vec3_t angles, qboolean force)
|
|||
static void
|
||||
CL_LinkPacketEntities (void)
|
||||
{
|
||||
int pnum, i;
|
||||
int pnum;
|
||||
dlight_t *dl;
|
||||
entity_t *ent;
|
||||
entity_state_t *s1;
|
||||
model_t *model;
|
||||
packet_entities_t *pack;
|
||||
player_info_t *info;
|
||||
//player_info_t *info;
|
||||
|
||||
pack = &cl.frames[cls.netchan.incoming_sequence &
|
||||
UPDATE_MASK].packet_entities;
|
||||
|
@ -246,25 +246,24 @@ CL_LinkPacketEntities (void)
|
|||
if (s1->colormap && (s1->colormap <= MAX_CLIENTS)
|
||||
&& cl.players[s1->colormap - 1].name[0]
|
||||
&& !strcmp (ent->model->name, "progs/player.mdl")) {
|
||||
ent->colormap = cl.players[s1->colormap - 1].translations;
|
||||
info = &cl.players[s1->colormap - 1];
|
||||
ent->skin = Skin_SetColormap (ent->skin, s1->colormap);
|
||||
//info = &cl.players[s1->colormap - 1];
|
||||
} else {
|
||||
ent->colormap = vid.colormap8;
|
||||
info = NULL;
|
||||
ent->skin = Skin_SetColormap (ent->skin, 0);
|
||||
//info = NULL;
|
||||
}
|
||||
|
||||
#if 0 //XXX
|
||||
if (info && info->skinname && !info->skin)
|
||||
Skin_Find (info);
|
||||
if (info && info->skin) {
|
||||
ent->skin = Skin_NewTempSkin ();
|
||||
if (ent->skin) {
|
||||
i = s1->colormap - 1;
|
||||
CL_NewTranslation (i, ent->skin);
|
||||
CL_NewTranslation (s1->colormap - 1, ent->skin);
|
||||
}
|
||||
} else {
|
||||
ent->skin = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
// LordHavoc: cleaned up Endy's coding style, and fixed Endy's bugs
|
||||
// Ender: Extend (Colormod) [QSG - Begin]
|
||||
// N.B: All messy code below is the sole fault of LordHavoc and
|
||||
|
@ -485,7 +484,7 @@ CL_LinkPlayers (void)
|
|||
|
||||
ent->model = cl.model_precache[state->pls.modelindex];
|
||||
ent->frame = state->pls.frame;
|
||||
ent->colormap = info->translations;
|
||||
ent->skin = Skin_SetColormap (ent->skin, j + 1);
|
||||
ent->skinnum = state->pls.skinnum;
|
||||
|
||||
CL_TransformEntity (ent, ang, false);
|
||||
|
@ -495,6 +494,7 @@ CL_LinkPlayers (void)
|
|||
|
||||
if (state->pls.modelindex == cl_playerindex) { //XXX
|
||||
// use custom skin
|
||||
#if 0
|
||||
if (!info->skin)
|
||||
Skin_Find (info);
|
||||
if (info && info->skin) {
|
||||
|
@ -505,7 +505,7 @@ CL_LinkPlayers (void)
|
|||
} else {
|
||||
ent->skin = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
ent->min_light = min (cl.fbskins, cl_fb_players->value);
|
||||
|
||||
if (ent->min_light >= 1.0)
|
||||
|
@ -539,8 +539,6 @@ CL_EmitEntities (void)
|
|||
if (!cl.validsequence)
|
||||
return;
|
||||
|
||||
Skin_ClearTempSkins ();
|
||||
|
||||
CL_LinkPlayers ();
|
||||
CL_LinkPacketEntities ();
|
||||
CL_UpdateTEnts ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue