diff --git a/qw/source/sbar.c b/qw/source/sbar.c index c615a8883..08935100e 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -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); diff --git a/qw/source/skin.c b/qw/source/skin.c index 2863e71ce..79476832a 100644 --- a/qw/source/skin.c +++ b/qw/source/skin.c @@ -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; }