From: z411 Date: Thu, 14 Jan 2021 15:20:59 +0000 (-0300) Subject: Merge branch 'master' into z411/bai-server X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d8f3458ac5996018c5efb03577b6f98ec58895cf;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into z411/bai-server --- d8f3458ac5996018c5efb03577b6f98ec58895cf diff --cc qcsrc/client/hud/panel/scoreboard.qc index 9d973bbfa,9965d58fb..0b788fdb1 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@@ -99,9 -93,10 +102,12 @@@ bool autocvar_hud_panel_scoreboard_othe bool autocvar_hud_panel_scoreboard_spectators_showping = true; bool autocvar_hud_panel_scoreboard_spectators_aligned = false; float autocvar_hud_panel_scoreboard_minwidth = 0.4; + bool autocvar_hud_panel_scoreboard_playerid = false; + string autocvar_hud_panel_scoreboard_playerid_prefix = "#"; + string autocvar_hud_panel_scoreboard_playerid_suffix = " "; +int average_ping[NUM_TEAMS]; + // mode 0: returns translated label // mode 1: prints name and description of all the labels string Label_getInfo(string label, int mode) diff --cc qcsrc/common/teams.qh index 9e3a8181f,62c3e7b16..e99b001b2 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@@ -89,24 -83,9 +89,24 @@@ vector Team_ColorRGB(int teamid case NUM_TEAM_4: return '1 0.0625 1'; // 0xFF0FFF } - return '0 0 0'; + return '0 0 0'; } +#ifdef CSQC +string Team_CustomName(int teamid) +{ + switch(teamid) + { + case NUM_TEAM_1: return ((teamname_red != "") ? teamname_red : "^1RED^7 team"); + case NUM_TEAM_2: return ((teamname_blue != "")? teamname_blue : "^4BLUE^7 team"); + case NUM_TEAM_3: return ((teamname_yellow != "") ? teamname_yellow : "^3YELLOW^7 team"); + case NUM_TEAM_4: return ((teamname_pink != "") ? teamname_pink : "^6PINK^7 team"); + } + + return NAME_NEUTRAL; +} +#endif + string Team_ColorName(int teamid) { switch(teamid) diff --cc qcsrc/server/weapons/accuracy.qc index 5a6ebf6b7,3eafbc76c..e940555e3 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@@ -25,15 -25,9 +25,15 @@@ bool accuracy_send(entity this, entity entity a = this.owner; if (IS_SPEC(a)) a = a.enemy; a = CS(a).accuracy; + + // z411 send entity number + if(g_duel) + WriteByte(MSG_ENTITY, etof(a.owner)); + else + WriteByte(MSG_ENTITY, 0); if (to != a.owner) - if (!autocvar_sv_accuracy_data_share && !CS(a.owner).cvar_cl_accuracy_data_share) + if (!autocvar_sv_accuracy_data_share && !CS_CVAR(a.owner).cvar_cl_accuracy_data_share) sf = 0; // note: zero sendflags can never be sent... so we can use that to say that we send no accuracy! WriteInt24_t(MSG_ENTITY, sf);