From 004d2c5ef15ab6c46c17cc28b258f3f2107798a9 Mon Sep 17 00:00:00 2001 From: otta8634 Date: Wed, 7 May 2025 21:33:08 +0800 Subject: [PATCH] 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. --- qcsrc/common/notifications/all.qh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")) \ -- 2.39.5