Made it so that the user may specify skin colors instead of skin names.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@726 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
988a3a2cda
commit
4ec4d1f38d
1 changed files with 34 additions and 2 deletions
|
@ -68,7 +68,7 @@ char *Skin_FindName (player_info_t *sc)
|
|||
if (cl.splitclients<2 && !cl.teamfortress && !(cl.fpd & FPD_NO_FORCE_SKIN))
|
||||
{
|
||||
char *skinname = NULL;
|
||||
player_state_t *state;
|
||||
// player_state_t *state;
|
||||
qboolean teammate;
|
||||
|
||||
teammate = (cl.teamplay && !strcmp(sc->team, skinforcing_team)) ? true : false;
|
||||
|
@ -216,7 +216,7 @@ qbyte *Skin_Cache8 (skin_t *skin)
|
|||
return out;
|
||||
|
||||
#ifdef SWQUAKE
|
||||
if (qrenderer == QR_SOFTWARE && r_pixbytes == 1) //only time FB has to exist... (gl can be disabled)
|
||||
if (qrenderer == QR_SOFTWARE && r_pixbytes == 1 && cls.allow_fbskins<0.2) //only time FB has to exist... (gl can be disabled)
|
||||
{
|
||||
for (x = 0; x < vid.fullbright; x++)
|
||||
fbremap[x] = GetPalette(host_basepal[((x+256-vid.fullbright)*3)], host_basepal[((x+256-vid.fullbright)*3)+1], host_basepal[((x+256-vid.fullbright)*3)+2]);
|
||||
|
@ -232,6 +232,34 @@ qbyte *Skin_Cache8 (skin_t *skin)
|
|||
// load the pic from disk
|
||||
//
|
||||
// sprintf (name, "players/male/%s.pcx", skin->name);
|
||||
if (strchr(skin->name, ' ')) //see if it's actually three colours
|
||||
{
|
||||
qbyte bv;
|
||||
int col[3];
|
||||
char *s;
|
||||
|
||||
s = COM_Parse(skin->name);
|
||||
col[0] = atof(com_token);
|
||||
s = COM_Parse(s);
|
||||
col[1] = atof(com_token);
|
||||
s = COM_Parse(s);
|
||||
col[2] = atof(com_token);
|
||||
|
||||
bv = GetPalette(col[0], col[1], col[2]);
|
||||
|
||||
skin->width = 320;
|
||||
skin->height = 200;
|
||||
skin->cachedbpp = 8;
|
||||
|
||||
out = Cache_Alloc (&skin->cache, 320*200, skin->name);
|
||||
|
||||
memset (out, bv, 320*200);
|
||||
|
||||
skin->failedload = false;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
sprintf (name, "skins/%s.pcx", skin->name);
|
||||
raw = COM_LoadTempFile (name);
|
||||
if (!raw)
|
||||
|
@ -439,6 +467,10 @@ void Skin_NextDownload (void)
|
|||
Skin_Find (sc);
|
||||
if (noskins.value)
|
||||
continue;
|
||||
|
||||
if (strchr(sc->skin->name, ' ')) //skip over skins using a space
|
||||
continue;
|
||||
|
||||
if (!CL_CheckOrDownloadFile(va("skins/%s.pcx", sc->skin->name), false))
|
||||
return; // started a download
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue