From: otta8634 Date: Wed, 7 May 2025 13:33:08 +0000 (+0800) Subject: Display a +0.00 race diff in yellow X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F1501%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Display a +0.00 race diff in yellow Previously this part of a notification would be shown in green as -0.00, despite the record evidently not being broken. It now displays +0.0 in yellow. --- diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 8f5d7f2465..12b6d63bc2 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -459,7 +459,7 @@ string BUFF_NAME(int i); ARG_CASE(ARG_CS_SV_HA, "f2race_time", TIME_ENCODED_TOSTRING(f2, true)) \ ARG_CASE(ARG_CS_SV_HA, "f3race_time", TIME_ENCODED_TOSTRING(f3, true)) \ ARG_CASE(ARG_CS_SV, "race_col", CCR((f1 == 1) ? "^F1" : "^F2")) \ - ARG_CASE(ARG_CS_SV, "race_diff", ((f2 > f3) ? sprintf("^1[+%s]", TIME_ENCODED_TOSTRING(f2 - f3, true)) : sprintf("^2[-%s]", TIME_ENCODED_TOSTRING(f3 - f2, true)))) \ + ARG_CASE(ARG_CS_SV, "race_diff", ((TIME_ENCODED_TOSTRING(fabs(f2 - f3), true) == "0.00") ? "^3[+0.0]" : (f2 > f3) ? sprintf("^1[+%s]", TIME_ENCODED_TOSTRING(f2 - f3, true)) : sprintf("^2[-%s]", TIME_ENCODED_TOSTRING(f3 - f2, true)))) \ ARG_CASE(ARG_CS, "missing_teams", notif_arg_missing_teams(f1)) \ ARG_CASE(ARG_CS, "pass_key", getcommandkey(_("drop flag"), "+use")) \ ARG_CASE(ARG_CS, "nade_key", getcommandkey(_("throw nade"), "dropweapon")) \