From: Mario Date: Thu, 28 Nov 2024 03:43:09 +0000 (+0000) Subject: Explicitly mark bots with a tag in the server list to reduce activity spoofing X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e6028c610c14b2e861b227ff0ae8db39467fd38c;p=xonotic%2Fxonotic-data.pk3dir.git Explicitly mark bots with a tag in the server list to reduce activity spoofing --- diff --git a/qcsrc/menu/xonotic/playerlist.qc b/qcsrc/menu/xonotic/playerlist.qc index f9f3edd67..10ab8f69c 100644 --- a/qcsrc/menu/xonotic/playerlist.qc +++ b/qcsrc/menu/xonotic/playerlist.qc @@ -88,7 +88,9 @@ void XonoticPlayerList_drawListBoxItem(entity me, int i, vector absSize, bool is string name = me.getPlayerList(me, i, PLAYERPARM_NAME); string score = me.getPlayerList(me, i, PLAYERPARM_SCORE); + string ping = me.getPlayerList(me, i, PLAYERPARM_PING); + bool is_bot = (ping == "0"); bool is_spectator = false; if(substring(score, strlen(score) - 10, 10) == ":spectator") { @@ -105,6 +107,9 @@ void XonoticPlayerList_drawListBoxItem(entity me, int i, vector absSize, bool is is_spectator = true; } + if(is_bot) + name = cons("^9(bot)^7", name); + if (is_spectator) { score = _("spectator");