mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
fix for qw skin upload every frame bug, thank deek for the fix and help
This commit is contained in:
parent
04d4df1e19
commit
9b4f09ff0f
1 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue