fix for qw skin upload every frame bug, thank deek for the fix and help

This commit is contained in:
Chris Ison 2001-05-27 09:19:24 +00:00
parent 04d4df1e19
commit 9b4f09ff0f

View file

@ -86,13 +86,13 @@ void
Skin_Find (player_info_t *sc)
{
skin_t *skin;
char name[128], *s;
char name[128];
char *s = NULL;
if (allskins[0])
strncpy (name, allskins, sizeof (name));
else {
s = Info_ValueForKey (sc->userinfo, "skin");
if (s && s[0])
if ((s = Info_ValueForKey (sc->userinfo, "skin")) && s[0])
strncpy (name, s, sizeof (name));
else
strncpy (name, baseskin->string, sizeof (name));
@ -101,6 +101,9 @@ Skin_Find (player_info_t *sc)
if (strstr (name, "..") || *name == '.')
strcpy (name, "base");
if (!allskins[0] && (!s || !strcaseequal (name, s)))
Info_SetValueForKey (sc->userinfo, "skin", name, MAX_INFO_STRING);
COM_StripExtension (name, name);
skin = Hash_Find (skin_hash, name);