void HUD_Scoreboard_UI_Disable()
{
scoreboard_ui_disabling = true;
- scoreboard_showscores = false;
+ sb_showscores = false;
}
void HUD_Scoreboard_UI_Disable_Instantly()
return false;
else if (HUD_Radar_Clickable())
return false;
- else if (scoreboard_showscores)
+ else if (sb_showscores) // set by +showscores engine command
return true;
else if (intermission == 1)
return true;
}
drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right
// map name and player count
- str = sprintf(_("^5%d^7/^5%d ^7players"), numplayers, srv_maxplayers ? srv_maxplayers : maxclients);
+ if (campaign)
+ str = "";
+ else
+ str = sprintf(_("^5%d^7/^5%d ^7players"), numplayers, srv_maxplayers ? srv_maxplayers : maxclients);
str = strcat("^7", _("Map:"), " ^2", mi_shortname, " ", str); // reusing "Map:" translatable string
drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left
}
if(MUTATOR_CALLHOOK(ShowRankings)) {
string ranktitle = M_ARGV(0, string);
- string unit = GetSpeedUnit(autocvar_hud_panel_physics_speed_unit);
+ string unit = GetSpeedUnit(autocvar_hud_speed_unit);
+ float conversion_factor = GetSpeedUnitFactor(autocvar_hud_speed_unit);
if(race_speedaward_alltimebest)
{
string name;
if(race_speedaward)
{
name = textShortenToWidth(ColorTranslateRGB(race_speedaward_holder), namesize, hud_fontsize, stringwidth_colors);
- str = sprintf(_("Speed award: %d%s ^7(%s^7)"), race_speedaward, unit, name);
+ str = sprintf(_("Speed award: %d%s ^7(%s^7)"), race_speedaward * conversion_factor, unit, name);
str = strcat(str, " / ");
}
name = textShortenToWidth(ColorTranslateRGB(race_speedaward_alltimebest_holder), namesize, hud_fontsize, stringwidth_colors);
- str = strcat(str, sprintf(_("All-time fastest: %d%s ^7(%s^7)"), race_speedaward_alltimebest, unit, name));
+ str = strcat(str, sprintf(_("All-time fastest: %d%s ^7(%s^7)"), race_speedaward_alltimebest * conversion_factor, unit, name));
drawcolorcodedstring(pos, str, hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
pos.y += 1.25 * hud_fontsize.y; // line height + line spacing
}
NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew)
{
make_pure(this);
- int i, j, b, f;
int nags = ReadByte(); // NAGS NAGS NAGS NAGS NAGS NAGS NADZ NAGS NAGS NAGS
strcpy(vote_called_vote, ReadString());
}
- if(nags & 1)
- {
- for(j = 0; j < maxclients; ++j)
- if(playerslots[j])
- playerslots[j].ready = true;
- for(i = 1; i <= maxclients; i += 8)
- {
- f = ReadByte();
- for(j = i-1, b = BIT(0); b < BIT(8); b <<= 1, ++j)
- if (!(f & b))
- if(playerslots[j])
- playerslots[j].ready = false;
- }
- }
+ if(nags & BIT(0))
+ for(int i = 0; i < maxclients;)
+ for(int f = ReadByte(), b = 0; b < 8 && i < maxclients; ++b, ++i)
+ if(playerslots[i])
+ playerslots[i].ready = f & BIT(b);
return = true;
race_server_record = ReadInt24_t();
break;
case RACE_NET_SPEED_AWARD:
- race_speedaward = ReadInt24_t() * GetSpeedUnitFactor(autocvar_hud_panel_physics_speed_unit);
+ race_speedaward = ReadInt24_t();
strcpy(race_speedaward_holder, ReadString());
break;
case RACE_NET_SPEED_AWARD_BEST:
- race_speedaward_alltimebest = ReadInt24_t() * GetSpeedUnitFactor(autocvar_hud_panel_physics_speed_unit);
+ race_speedaward_alltimebest = ReadInt24_t();
strcpy(race_speedaward_alltimebest_holder, ReadString());
break;
case RACE_NET_RANKINGS_CNT:
bool net_handle_ServerWelcome()
{
- bool campaign = ReadByte();
+ campaign = ReadByte();
if (campaign)
{
string campaign_title = ReadString();