Misc. cleanups.

This commit is contained in:
Jeff Teunissen 2001-08-15 22:37:11 +00:00
parent 3c5265c4b4
commit 339ec3c0d8
2 changed files with 8 additions and 11 deletions

View file

@ -615,10 +615,8 @@ Sbar_DrawFrags (void)
continue;
// draw background
top = s->topcolor;
bottom = s->bottomcolor;
top = (top < 0) ? 0 : ((top > 13) ? 13 : top);
bottom = (bottom < 0) ? 0 : ((bottom > 13) ? 13 : bottom);
top = bound (0, s->topcolor, 13);
bottom = bound (0, s->bottomcolor, 13);
top = Sbar_ColorForMap (top);
bottom = Sbar_ColorForMap (bottom);

View file

@ -86,13 +86,13 @@ skin_get_key (void *_skin, void *unused)
void
Skin_Find (player_info_t *sc)
{
skin_t *skin;
char name[128];
const char *s = NULL;
skin_t *skin;
char name[128];
const char *s = NULL;
if (allskins[0])
if (allskins[0]) {
strncpy (name, allskins, sizeof (name));
else {
} else {
if ((s = Info_ValueForKey (sc->userinfo, "skin")) && s[0])
strncpy (name, s, sizeof (name));
else
@ -114,8 +114,7 @@ Skin_Find (player_info_t *sc)
return;
}
if (numskins == MAX_CACHED_SKINS) { // ran out of spots, so flush
// everything
if (numskins == MAX_CACHED_SKINS) { // ran out of spots, so flush everything
Skin_Flush ();
return;
}