From: terencehill Date: Mon, 29 Mar 2021 16:25:45 +0000 (+0200) Subject: Log frezetag revivals X-Git-Tag: xonotic-v0.8.5~478 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=84bd0029952ef1095b1f145a5afa9eee38f6192a;p=xonotic%2Fxonotic-data.pk3dir.git Log frezetag revivals --- diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc index 40d604175..f68b00219 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc @@ -573,6 +573,8 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) if(n == -1) { + if(autocvar_sv_eventlog) + GameLogEcho(strcat(":ft:autorevival:", ftos(player.playerid))); Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_AUTO_REVIVED, frozen_time); Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_AUTO_REVIVED, player.netname, frozen_time); return true; @@ -590,6 +592,14 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_REVIVED, first.netname); Send_Notification(NOTIF_ONE, first, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname); Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_REVIVED, player.netname, first.netname); + if(autocvar_sv_eventlog) + { + string revivers = ""; + for(entity it = reviving_players_first; it; it = it.chain) + revivers = strcat(revivers, ftos(it.playerid), ","); + revivers = substring(revivers, 0, strlen(revivers) - 1); + GameLogEcho(strcat(":ft:revival:", ftos(player.playerid), ":", revivers)); + } } for(entity it = reviving_players_first; it; it = it.chain)