sb_items[11] = Draw_CachePic ("gfx/sb_flag_red_taken", true);
sb_items[12] = Draw_CachePic ("gfx/sb_flag_red_lost", true);
sb_items[13] = Draw_CachePic ("gfx/sb_flag_red_carrying", true);
+ sb_items[14] = Draw_CachePic ("gfx/sb_key_carrying", true);
sb_items[15] = Draw_CachePic ("gfx/sb_flag_blue_taken", true);
sb_items[16] = Draw_CachePic ("gfx/sb_flag_blue_lost", true);
sb_items[17] = Draw_CachePic ("gfx/sb_flag_blue_carrying", true);
const int w_width = 300, w_height = 100, w_space = 10;
const float w_scale = 0.4;
- DrawQ_Pic(vid_conwidth.integer - (w_width + w_space) * w_scale, (w_height + w_space) * w_scale * nr + w_space, sb_weapons[0][nr], w_width * w_scale, w_height * w_scale, (active) ? 1 : 0.6, active ? 1 : 0.6, active ? 1 : 1, fade * sbar_alpha_fg.value, DRAWFLAG_ADDITIVE);
+ DrawQ_Pic(vid_conwidth.integer - (w_width + w_space) * w_scale, (w_height + w_space) * w_scale * nr + w_space, sb_weapons[0][nr], w_width * w_scale, w_height * w_scale, (active) ? 1 : 0.6, active ? 1 : 0.6, active ? 1 : 1, fade * sbar_alpha_fg.value, DRAWFLAG_NORMAL);
//DrawQ_String(vid_conwidth.integer - (w_space + font_size ), (w_height + w_space) * w_scale * nr + w_space, va("%i",nr+1), 0, font_size, font_size, 1, 0, 0, fade, 0, NULL, true);
-
- if (active)
- DrawQ_Fill(vid_conwidth.integer - (w_width + w_space) * w_scale, (w_height + w_space) * w_scale * nr + w_space, w_width * w_scale, w_height * w_scale, 0.3, 0.3, 0.3, fade * sbar_alpha_fg.value, DRAWFLAG_ADDITIVE);
}
/*
else if (sb_lines)
{
int i;
- double time;
float fade;
int redflag, blueflag;
- // we have a max time 2s (min time = 0)
- if ((time = max(0, cl.time - cl.weapontime)) < 2)
+ // calculate intensity to draw weapons bar at
+ fade = 3 - 2 * (cl.time - cl.weapontime);
+ if (fade > 0)
{
- fade = (1.0 - 0.5 * time);
- fade *= fade;
+ fade = min(fade, 1);
for (i = 0; i < 8;i++)
if (cl.stats[STAT_ITEMS] & (1 << i))
Sbar_DrawWeapon(i + 1, fade, (i + 2 == cl.stats[STAT_ACTIVEWEAPON]));
// flag icons
redflag = ((cl.stats[STAT_ITEMS]>>15) & 3);
- if (redflag)
- Sbar_DrawPic (10 - sbar_x, -85, sb_items[redflag+10]);
blueflag = ((cl.stats[STAT_ITEMS]>>17) & 3);
- if (blueflag)
- Sbar_DrawPic (10 - sbar_x, -145, sb_items[blueflag+14]);
+ if (redflag == 3 && blueflag == 3)
+ {
+ // The Impossible Combination[tm]
+ // Can only happen in Key Hunt mode...
+ Sbar_DrawPic (10 - sbar_x, -179, sb_items[14]);
+ }
+ else
+ {
+ if (redflag)
+ Sbar_DrawPic (10 - sbar_x, -109, sb_items[redflag+10]);
+ if (blueflag)
+ Sbar_DrawPic (10 - sbar_x, -169, sb_items[blueflag+14]);
+ }
// armor
Sbar_DrawXNum ((340-3*24), 12, cl.stats[STAT_ARMOR], 3, 24, 0.6,0.7,0.8,1,0);
MSG_WriteByte(&cls.netcon->message, qw_clc_stringcmd);
MSG_WriteString(&cls.netcon->message, "pings");
}
- else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6 || cls.protocol == PROTOCOL_DARKPLACES7)
+ else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6/* || cls.protocol == PROTOCOL_DARKPLACES7*/)
{
// these servers usually lack the pings command and so a less efficient "ping" command must be sent, which on modern DP servers will also reply with a pingplreport command after the ping listing
static int ping_anyway_counter = 0;
}
else
{
- // newer server definitely has pings command, so use it for more efficiency
+ // newer server definitely has pings command, so use it for more efficiency, avoids ping reports spamming the console if they are misparsed, and saves a little bandwidth
MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
MSG_WriteString(&cls.netcon->message, "pings");
}