From 6fde3adc5a678f45b1782580ab757d80d57f9185 Mon Sep 17 00:00:00 2001 From: otta8634 Date: Sat, 14 Dec 2024 12:15:12 +0800 Subject: [PATCH] Add code to support adding handicap icon to scoreboard Currently it's disabled with an if (false), since handicap isn't yet networked to the client. - This commit will be followed up by networking handicap to the client and enabling showing the icon. Added handicap icon, based on https://commons.wikimedia.org/wiki/File:Wheelchair_symbol.svg, ... modified with Inkscape to be more consistent with other HUD icons like mediasource's gfx/luma/gfx/scoreboard/player_ready.svg - Resized to be 32x32 with 3px padding around all edges (and thus made it be "square"). - Made the lines thicker, and extended the foot-rest. - Increased the size of the gap between the frame and the wheel. - Removed the arm-rest. - Mostly properly aligned the head to the right. Scoreboard changes: - Now player_ready and playercolors can be shown simultaneously, side-by-side. - Support for this was added with sbt_field_icon_extra*. In future it may be worthwhile considering making the extra icons align right, I think that would look better. --- gfx/scoreboard/player_handicap.tga | Bin 0 -> 4114 bytes qcsrc/client/hud/panel/scoreboard.qc | 200 ++++++++++++++++++--------- qcsrc/server/handicap.qc | 6 + qcsrc/server/handicap.qh | 5 + 4 files changed, 145 insertions(+), 66 deletions(-) create mode 100644 gfx/scoreboard/player_handicap.tga diff --git a/gfx/scoreboard/player_handicap.tga b/gfx/scoreboard/player_handicap.tga new file mode 100644 index 0000000000000000000000000000000000000000..180ac90db37eb2cf8e21701b5a1419927b66c0ad GIT binary patch literal 4114 zcmb`K2~3uC9LKqd`@W3i2na?H3X+h;O9BSQGL0kTQUZZshGYSetQ;F|RvQ5Y6H1tP z(Tw2?G#W>8*gyz%6C{oWao-@feZS`OMkvlEkNfO>dH>Jz|6SkT@Bb(vAtfPP#uE5v zDg3qSQxbnm0|lT7Hi8#`HQ+NwKpQ9m8NmD3^P-z_KpoK5Cg1|xfe35{CO`wogMY)q zAM0>2c4c4)wn#}y?KU(tJm~1?m||jL5+^M!{SJQL3YZraz#OdC#auFW=GPXse8R%Q zvYVTmJNx_lCvM%k^=Ev1{7E@EIe)C%0Uf{`tXB=V59`j@U2Sb`Q`*|v`tPl{dU|?B zU0q#|VqNs$KHk4xHQ+wXy&2f$>+738H8r)c!u-9txw%E;paAP$z!*@6>uH}grOw~= z_VzBCoSa--X@7iteBRH`?*!I8fiYN5`_!HqV6O!`J3Id{JUlFpe`aQ8DK|H_T|+}7 z1?#ThS?~;C-JbSh4h8K|Tl=i7t+njZ#z)4b4(nn8E@6!z% zHWW2AHBAZjuU@@6uBxh9hsiQ#r>7S^Jw2QA^Ye!U`$I!R^M?){>O_9pFc(`6960bB{H=|N ziK&W4Ey?*|t+#TRZj2l`CD#%ggu8&Cbp)`S|$U zNKa4i73_0uVPRo;et!NT_&aA)PEJmhjEoHPu?=vJK5jnne4~!S0s{j}Fl)rUJ~%iy z@8;%KmztW|D)=P$@wm^{*48mAE30p?ryqC`P+QEwqb|;wH*lUL6&4nX?JO=XE+g(P zd3pJ>Nl8h+GOo4aW-hoU_=J0xQHOf;&|&N?0zwX`#npA#g5TI{U!u=Oggv0Yc?SoF zYOH-_Z*PA*F){HR>i$z~Y;0w8baV}BUKbe|c`ZCVyeTv^^fv5ukB*Ltb5~baH=?hv zpN;4D0?r9NK&^4ca8^*0^o2DFLcUIPcXx~DOnrU*q`JEL1*}ou+=IEKz9T^__yBwa zj)GhzC8f%X7cYwar*?yaf@-kFK4njA0<1Ol#u*{_@fyB|;GF%gx3_mzh`+qNd{j|U z@eJ0Y!Rvs}zXaIl>~|-?-}eB%ljH;k2jAfNAnbv@9aL6UF2Z^;2mrj_7CZ;23F?x) zy4T#?JiDW#V_JB&v9WOy{qQ5!7%OM7DPRuizdm3rHoy(qc@NqxFf}zTZD?o^&q|(K zm>)OM3ne&5vQtu0G7+ago?$H11bfpS?8bR^3^f}R?DJU{7neG$eGa?!xc~3u{ z2h4%5rKRN&*lmNYpOcf5I|MDVXNrr9hchxV{%UV;pG0o%qL(tEOE)~np65Q6zzzBP zFf%jr_obzO(#K~D3JUsER8-DlJs!LXs8z8n+s4M`T4!gc z_`KwPD|;6))*;qic$R(1cvuVOAjsX_{q(@VfLH@~?^#4Ve?0JkdEiV51>qnO=R|fu zKtL^YbC-F;Y@W2Ru&BiQLC;E?T!SCWV`F2}RaI4$W@cv8qZMEsd2TV6ZqQp&US8f! z_CBBCMIV?4)&hFCfO}4PwLVSwalogsp(tkKfhBC)Fk_&wzhTxG0&~^lfLrY z@bK^`M1H?0D=TZfeED)qL_|ah-XXq5eGg-QUqHQ6%UVDQa2D{BXXaM;w%^IgDUUv^ z-k&xeb z1Wm5CO}ohR!lg@>I`KY!61LyRK05*XLYNoU_-+o^Z_GDi<(V%Hgjvi_{-y?u0nZ~p z)cO-@68+N**$#AIK2U3%lh?0bAAv4z`}_MB<9+Zb?hghcKwUAHoD;OiSUGovc%|@N zu#2zai@yu+B7FY-Y{6$Ba|#=2m{H$ie&iuHIl8*K$D#iOtnUL}U^5UjMO)m9wPl=Z z*~HR+F5bslFh}&CeZk(`4p>9ZP{zrc?g1WvTDAb}B^5xsPihahK6EiR^qYOb{IPDF bRjeoL`U;?i=@)ao5pX8bXZlXtPkj9i6Ekjb literal 0 HcmV?d00001 diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index af56134c2..6bf269152 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -973,19 +973,21 @@ string Scoreboard_AddPlayerId(string pl_name, entity pl) // MOVEUP:: vector sbt_field_rgb; -string sbt_field_icon0; -string sbt_field_icon1; -string sbt_field_icon2; -vector sbt_field_icon0_rgb; -vector sbt_field_icon1_rgb; -vector sbt_field_icon2_rgb; +// these are drawn overlapping +string sbt_field_icon_playercolor0; +string sbt_field_icon_playercolor1; +string sbt_field_icon_playercolor2; +vector sbt_field_icon_playercolor0_rgb; +vector sbt_field_icon_playercolor1_rgb; +vector sbt_field_icon_playercolor2_rgb; +// these are drawn side-by-side, next to playercolor (if present) +string sbt_field_icon_extra0; // player_ready +string sbt_field_icon_extra1; // player_handicap +vector sbt_field_icon_extra0_rgb; +vector sbt_field_icon_extra1_rgb; string Scoreboard_GetName(entity pl) { - if(ready_waiting && pl.ready) - { - sbt_field_icon0 = "gfx/scoreboard/player_ready"; - } - else if(!teamplay) + if (!teamplay) { int f; // NOTE: always adding 1024 allows saving the colormap 0 as a value != 0 @@ -994,13 +996,20 @@ string Scoreboard_GetName(entity pl) else f = entcs_GetClientColors(pl.sv_entnum); - { - sbt_field_icon0 = "gfx/scoreboard/playercolor_base"; - sbt_field_icon1 = "gfx/scoreboard/playercolor_shirt"; - sbt_field_icon1_rgb = colormapPaletteColor(floor(f / 16), 0); - sbt_field_icon2 = "gfx/scoreboard/playercolor_pants"; - sbt_field_icon2_rgb = colormapPaletteColor(f % 16, 1); - } + sbt_field_icon_playercolor0 = "gfx/scoreboard/playercolor_base"; + sbt_field_icon_playercolor1 = "gfx/scoreboard/playercolor_shirt"; + sbt_field_icon_playercolor1_rgb = colormapPaletteColor(floor(f / 16), 0); + sbt_field_icon_playercolor2 = "gfx/scoreboard/playercolor_pants"; + sbt_field_icon_playercolor2_rgb = colormapPaletteColor(f % 16, 1); + } + if (ready_waiting && pl.ready) + { + sbt_field_icon_extra0 = "gfx/scoreboard/player_ready"; + } + if (false) // TODO + { + sbt_field_icon_extra1 = "gfx/scoreboard/player_handicap"; + sbt_field_icon_extra1_rgb = '1 1 1'; } return entcs_GetName(pl.sv_entnum); } @@ -1027,12 +1036,16 @@ string Scoreboard_GetField(entity pl, PlayerScoreField field, bool per_round) int f; string str; sbt_field_rgb = '1 1 1'; - sbt_field_icon0 = ""; - sbt_field_icon1 = ""; - sbt_field_icon2 = ""; - sbt_field_icon0_rgb = '1 1 1'; - sbt_field_icon1_rgb = '1 1 1'; - sbt_field_icon2_rgb = '1 1 1'; + sbt_field_icon_playercolor0 = ""; + sbt_field_icon_playercolor1 = ""; + sbt_field_icon_playercolor2 = ""; + sbt_field_icon_extra0 = ""; + sbt_field_icon_extra1 = ""; + sbt_field_icon_playercolor0_rgb = '1 1 1'; + sbt_field_icon_playercolor1_rgb = '1 1 1'; + sbt_field_icon_playercolor2_rgb = '1 1 1'; + sbt_field_icon_extra0_rgb = '1 1 1'; + sbt_field_icon_extra1_rgb = '1 1 1'; int rounds_played = 0; if (per_round) rounds_played = pl.(scores(SP_ROUNDS_PL)); @@ -1170,7 +1183,9 @@ string Scoreboard_GetField(entity pl, PlayerScoreField field, bool per_round) } float sbt_fixcolumnwidth_len; -float sbt_fixcolumnwidth_iconlen; +float sbt_fixcolumnwidth_iconlen_playercolor; +float sbt_fixcolumnwidth_iconlen_extra0; +float sbt_fixcolumnwidth_iconlen_extra1; float sbt_fixcolumnwidth_marginlen; string Scoreboard_FixColumnWidth(int i, string str, bool init) @@ -1179,37 +1194,55 @@ string Scoreboard_FixColumnWidth(int i, string str, bool init) float f; vector sz; - sbt_fixcolumnwidth_iconlen = 0; + sbt_fixcolumnwidth_iconlen_playercolor = 0; + sbt_fixcolumnwidth_iconlen_extra0 = 0; + sbt_fixcolumnwidth_iconlen_extra1 = 0; - if(sbt_field_icon0 != "") + if(sbt_field_icon_playercolor0 != "") { - sz = draw_getimagesize(sbt_field_icon0); + sz = draw_getimagesize(sbt_field_icon_playercolor0); f = sz.x / sz.y; - if(sbt_fixcolumnwidth_iconlen < f) - sbt_fixcolumnwidth_iconlen = f; + if(sbt_fixcolumnwidth_iconlen_playercolor < f) + sbt_fixcolumnwidth_iconlen_playercolor = f; } - - if(sbt_field_icon1 != "") + if(sbt_field_icon_playercolor1 != "") { - sz = draw_getimagesize(sbt_field_icon1); + sz = draw_getimagesize(sbt_field_icon_playercolor1); f = sz.x / sz.y; - if(sbt_fixcolumnwidth_iconlen < f) - sbt_fixcolumnwidth_iconlen = f; + if(sbt_fixcolumnwidth_iconlen_playercolor < f) + sbt_fixcolumnwidth_iconlen_playercolor = f; } - - if(sbt_field_icon2 != "") + if(sbt_field_icon_playercolor2 != "") { - sz = draw_getimagesize(sbt_field_icon2); + sz = draw_getimagesize(sbt_field_icon_playercolor2); f = sz.x / sz.y; - if(sbt_fixcolumnwidth_iconlen < f) - sbt_fixcolumnwidth_iconlen = f; + if(sbt_fixcolumnwidth_iconlen_playercolor < f) + sbt_fixcolumnwidth_iconlen_playercolor = f; } - - if(sbt_fixcolumnwidth_iconlen != 0) + // NOTE: extra icons (player_ready and player_handicap) are squares (32x32), so this may not be necessary + // simply setting sbt_fixcolumnwidth_iconlen_extra* = 1 would be equivalent + if(sbt_field_icon_extra0 != "") { - sbt_fixcolumnwidth_iconlen *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect - sbt_fixcolumnwidth_marginlen = stringwidth(" ", false, hud_fontsize); + sz = draw_getimagesize(sbt_field_icon_extra0); + sbt_fixcolumnwidth_iconlen_extra0 = sz.x / sz.y; + } + if(sbt_field_icon_extra1 != "") + { + sz = draw_getimagesize(sbt_field_icon_extra1); + sbt_fixcolumnwidth_iconlen_extra1 = sz.x / sz.y; } + + if(sbt_fixcolumnwidth_iconlen_playercolor != 0) + sbt_fixcolumnwidth_iconlen_playercolor *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect + if(sbt_fixcolumnwidth_iconlen_extra0 != 0) + sbt_fixcolumnwidth_iconlen_extra0 *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect + if(sbt_fixcolumnwidth_iconlen_extra1 != 0) + sbt_fixcolumnwidth_iconlen_extra1 *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect + + if(sbt_fixcolumnwidth_iconlen_playercolor != 0 + || sbt_fixcolumnwidth_iconlen_extra0 != 0 + || sbt_fixcolumnwidth_iconlen_extra1 != 0) + sbt_fixcolumnwidth_marginlen = stringwidth(" ", false, hud_fontsize); else sbt_fixcolumnwidth_marginlen = 0; @@ -1219,20 +1252,22 @@ string Scoreboard_FixColumnWidth(int i, string str, bool init) if(sbt_field[i] == SP_NAME) // name gets all remaining space { int j; - float remaining_space = 0; + float used_space = 0; for(j = 0; j < sbt_num_fields; ++j) if(j != i) if (sbt_field[i] != SP_SEPARATOR) - remaining_space += sbt_field_size[j] + hud_fontsize.x; - sbt_field_size[i] = max(sbt_field_title_width[i], panel_size.x - remaining_space); - - if (sbt_fixcolumnwidth_iconlen != 0) - remaining_space += sbt_fixcolumnwidth_marginlen + sbt_fixcolumnwidth_iconlen * hud_fontsize.x; - float namesize = max(sbt_field_title_width[i], panel_size.x - remaining_space); + used_space += sbt_field_size[j] + hud_fontsize.x; + sbt_field_size[i] = max(sbt_field_title_width[i], panel_size.x - used_space); + + used_space += sbt_fixcolumnwidth_marginlen + + hud_fontsize.x * sbt_fixcolumnwidth_iconlen_playercolor + + hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra0 + + hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra1; + float namesize = max(sbt_field_title_width[i], panel_size.x - used_space); str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors); sbt_fixcolumnwidth_len = stringwidth(str, true, hud_fontsize); - max_namesize = max(sbt_field_title_width[i], vid_conwidth - remaining_space); + max_namesize = max(sbt_field_title_width[i], vid_conwidth - used_space); } else { @@ -1246,7 +1281,10 @@ string Scoreboard_FixColumnWidth(int i, string str, bool init) sbt_fixcolumnwidth_len = stringwidth(str, false, hud_fontsize); } - f = sbt_fixcolumnwidth_len + sbt_fixcolumnwidth_marginlen + sbt_fixcolumnwidth_iconlen * hud_fontsize.x; + f = sbt_fixcolumnwidth_len + sbt_fixcolumnwidth_marginlen + + hud_fontsize.x * sbt_fixcolumnwidth_iconlen_playercolor + + hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra0 + + hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra1; if(sbt_field_size[i] < f) sbt_field_size[i] = f; @@ -1392,6 +1430,7 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i pos.x += hud_fontsize.x * 0.5; pos.y += (1.25 - 1) / 2 * hud_fontsize.y; // center text vertically vector tmp = '0 0 0'; + vector icon_sz; int i; PlayerScoreField field; for(i = 0; i < sbt_num_fields; ++i) @@ -1410,7 +1449,10 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i pos.x += sbt_field_size[i] + hud_fontsize.x; if(field == SP_NAME) { - tmp.x = sbt_field_size[i] - hud_fontsize.x * sbt_fixcolumnwidth_iconlen - sbt_fixcolumnwidth_marginlen + hud_fontsize.x; + tmp.x = sbt_field_size[i] - sbt_fixcolumnwidth_marginlen + hud_fontsize.x + - hud_fontsize.x * sbt_fixcolumnwidth_iconlen_playercolor + - hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra0 + - hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra1; drawcolorcodedstring(pos - tmp, str, hud_fontsize, fg_alpha, DRAWFLAG_NORMAL); } else { tmp.x = sbt_fixcolumnwidth_len + hud_fontsize.x; @@ -1418,12 +1460,25 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i } tmp.x = sbt_field_size[i] + hud_fontsize.x; - if(sbt_field_icon0 != "") - drawpic(pos - tmp, sbt_field_icon0, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL); - if(sbt_field_icon1 != "") - drawpic(pos - tmp, sbt_field_icon1, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL); - if(sbt_field_icon2 != "") - drawpic(pos - tmp, sbt_field_icon2, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon2_rgb, fg_alpha, DRAWFLAG_NORMAL); + icon_sz = vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen_playercolor, hud_fontsize.y); + if(sbt_field_icon_playercolor0 != "") + drawpic(pos - tmp, sbt_field_icon_playercolor0, icon_sz, sbt_field_icon_playercolor1_rgb, fg_alpha, DRAWFLAG_NORMAL); + if(sbt_field_icon_playercolor1 != "") + drawpic(pos - tmp, sbt_field_icon_playercolor1, icon_sz, sbt_field_icon_playercolor1_rgb, fg_alpha, DRAWFLAG_NORMAL); + if(sbt_field_icon_playercolor2 != "") + drawpic(pos - tmp, sbt_field_icon_playercolor2, icon_sz, sbt_field_icon_playercolor2_rgb, fg_alpha, DRAWFLAG_NORMAL); + tmp.x -= icon_sz.x; + if(sbt_field_icon_extra0 != "") + { + icon_sz.x = hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra0; + drawpic(pos - tmp, sbt_field_icon_extra0, icon_sz, sbt_field_icon_extra0_rgb, fg_alpha, DRAWFLAG_NORMAL); + tmp.x -= icon_sz.x; + } + if(sbt_field_icon_extra1 != "") + { + icon_sz.x = hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra1; + drawpic(pos - tmp, sbt_field_icon_extra1, icon_sz, sbt_field_icon_extra1_rgb, fg_alpha, DRAWFLAG_NORMAL); + } } if(sbt_field[i] == SP_SEPARATOR) @@ -1452,12 +1507,25 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i } tmp.x = sbt_field_size[i]; - if(sbt_field_icon0 != "") - drawpic(pos - tmp, sbt_field_icon0, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL); - if(sbt_field_icon1 != "") - drawpic(pos - tmp, sbt_field_icon1, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL); - if(sbt_field_icon2 != "") - drawpic(pos - tmp, sbt_field_icon2, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon2_rgb, fg_alpha, DRAWFLAG_NORMAL); + icon_sz = vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen_playercolor, hud_fontsize.y); + if(sbt_field_icon_playercolor0 != "") + drawpic(pos - tmp, sbt_field_icon_playercolor0, icon_sz, sbt_field_icon_playercolor1_rgb, fg_alpha, DRAWFLAG_NORMAL); + if(sbt_field_icon_playercolor1 != "") + drawpic(pos - tmp, sbt_field_icon_playercolor1, icon_sz, sbt_field_icon_playercolor1_rgb, fg_alpha, DRAWFLAG_NORMAL); + if(sbt_field_icon_playercolor2 != "") + drawpic(pos - tmp, sbt_field_icon_playercolor2, icon_sz, sbt_field_icon_playercolor2_rgb, fg_alpha, DRAWFLAG_NORMAL); + tmp.x -= icon_sz.x; + if(sbt_field_icon_extra0 != "") + { + icon_sz.x = hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra0; + drawpic(pos - tmp, sbt_field_icon_extra0, icon_sz, sbt_field_icon_extra0_rgb, fg_alpha, DRAWFLAG_NORMAL); + tmp.x -= icon_sz.x; + } + if(sbt_field_icon_extra1 != "") + { + icon_sz.x = hud_fontsize.x * sbt_fixcolumnwidth_iconlen_extra1; + drawpic(pos - tmp, sbt_field_icon_extra1, icon_sz, sbt_field_icon_extra1_rgb, fg_alpha, DRAWFLAG_NORMAL); + } pos.x -= sbt_field_size[i] + hud_fontsize.x; } } diff --git a/qcsrc/server/handicap.qc b/qcsrc/server/handicap.qc index 5c03cd11b..8669897dc 100644 --- a/qcsrc/server/handicap.qc +++ b/qcsrc/server/handicap.qc @@ -88,3 +88,9 @@ float Handicap_GetTotalHandicap(entity player, bool receiving) return Handicap_GetForcedHandicap(player, receiving) * Handicap_GetVoluntaryHandicap(player, receiving); } + +float Handicap_GetTotalBidirectionalHandicap(entity player) +{ + return Handicap_GetTotalHandicap(player, true) * + Handicap_GetTotalHandicap(player, false); +} diff --git a/qcsrc/server/handicap.qh b/qcsrc/server/handicap.qh index 48129ed5c..987245f80 100644 --- a/qcsrc/server/handicap.qh +++ b/qcsrc/server/handicap.qh @@ -45,3 +45,8 @@ void Handicap_SetForcedHandicap(entity player, float value, bool receiving); /// \param[in] receiving Whether handicap is for receiving or dealing. /// \return Total handicap of the player. float Handicap_GetTotalHandicap(entity player, bool receiving); + +/// \brief Returns the total both-ways handicap of the player. +/// \param[in] player Player to check. +/// \return Total handicap of the player accounting for damage given and taken. +float Handicap_GetTotalBidirectionalHandicap(entity player); -- 2.39.2