From: LegendaryGuard Date: Sun, 11 Apr 2021 23:59:34 +0000 (+0200) Subject: Fix and improvement of Corpse Detection info X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54214f87dccf52961916221ae516011218683114;p=xonotic%2Fxonotic-data.pk3dir.git Fix and improvement of Corpse Detection info --- diff --git a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc index 1a374e51c..19a3f94f2 100644 --- a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc +++ b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc @@ -646,18 +646,24 @@ MUTATOR_HOOKFUNCTION(mmm, Damage_Calculate) if (target.mmm_status == MMM_STATUS_CIVILIAN) { //try to add centerprint message for chat privately if possible - corpsemessagestrcat = strcat("\n^3Name:^7 ", target.netname, "\n^3Role: ^2Civilian", killedbyphrase, wepkilledphrase); - centerprint(attacker, strcat(BOLD_OPERATOR, corpsemessagestrcat));//("\n^6Name^3:^7 ", target.netname, "\n^5Role^3: ^2Civilian\n", "^1Killed by^3:^7 ", target.whokilled))); + corpsemessagestrcat = strcat("^5DEAD PLAYER DETAILS^7: \n^3Name:^7 ", target.netname, "\n^3Role: ^2Civilian", killedbyphrase, wepkilledphrase); + //centerprint(attacker, strcat(BOLD_OPERATOR, corpsemessagestrcat)); + Send_Notification(NOTIF_ONE_ONLY, attacker, MSG_CENTER, CENTER_MMM_CORPSEDETECTION, corpsemessagestrcat); + Send_Notification(NOTIF_ONE_ONLY, attacker, MSG_INFO, INFO_MMM_CORPSEDETECTION, corpsemessagestrcat); } else if (target.mmm_status == MMM_STATUS_MURDERER) { - corpsemessagestrcat = strcat("\n^3Name:^7 ", target.netname, "\n^3Role: ^1Murderer", killedbyphrase, wepkilledphrase); - centerprint(attacker, strcat(BOLD_OPERATOR, corpsemessagestrcat));//("\n^6Name^3:^7 ", target.netname, "\n^5Role^3: ^1Murderer\n", "^1Killed by^3:^7 ", target.whokilled))); + corpsemessagestrcat = strcat("^5DEAD PLAYER DETAILS^7: \n^3Name:^7 ", target.netname, "\n^3Role: ^1Murderer", killedbyphrase, wepkilledphrase); + //centerprint(attacker, strcat(BOLD_OPERATOR, corpsemessagestrcat)); + Send_Notification(NOTIF_ONE_ONLY, attacker, MSG_CENTER, CENTER_MMM_CORPSEDETECTION, corpsemessagestrcat); + Send_Notification(NOTIF_ONE_ONLY, attacker, MSG_INFO, INFO_MMM_CORPSEDETECTION, corpsemessagestrcat); } else if (target.mmm_status == MMM_STATUS_SLEUTH) { - corpsemessagestrcat = strcat("\n^3Name:^7 ", target.netname, "\n^3Role: ^4Sleuth", killedbyphrase, wepkilledphrase); - centerprint(attacker, strcat(BOLD_OPERATOR, corpsemessagestrcat));//("\n^6Name^3:^7 ", target.netname, "\n^5Role^3: ^4Sleuth\n", "^1Killed by^3:^7 ", target.whokilled))); + corpsemessagestrcat = strcat("^5DEAD PLAYER DETAILS^7: \n^3Name:^7 ", target.netname, "\n^3Role: ^4Sleuth", killedbyphrase, wepkilledphrase); + //centerprint(attacker, strcat(BOLD_OPERATOR, corpsemessagestrcat)); + Send_Notification(NOTIF_ONE_ONLY, attacker, MSG_CENTER, CENTER_MMM_CORPSEDETECTION, corpsemessagestrcat); + Send_Notification(NOTIF_ONE_ONLY, attacker, MSG_INFO, INFO_MMM_CORPSEDETECTION, corpsemessagestrcat); } attacker.investigated = true; } diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index 0d2026a63..32273000d 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -450,7 +450,8 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != //LegendGuard adds N_CHATCON option 20-03-2021 MSG_INFO_NOTIF(MMM_SLEUTH, N_CHATCON, 0, 0, "", "", "", _("^BGYou are ^4Sleuth^BG!"), "") - MSG_INFO_NOTIF(MMM_WHOISSLEUTH, N_CHATCON, 1, 0, "s1", "s1", "", _("^BG%s is ^4Sleuth^BG!"), "") + MSG_INFO_NOTIF(MMM_WHOISSLEUTH, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s is ^4Sleuth^BG!"), "") + MSG_INFO_NOTIF(MMM_CORPSEDETECTION, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s"), "") MSG_INFO_NOTIF(VERSION_BETA, N_CONSOLE, 2, 0, "s1 s2", "", "", _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s"), "") MSG_INFO_NOTIF(VERSION_OLD, N_CHATCON, 2, 0, "s1 s2", "", "", _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s"), "") @@ -790,6 +791,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_CENTER_NOTIF(MMM_CIVILIAN_WIN, N_ENABLE, 0, 0, "", CPID_ROUND, "0 0", _("^F1Civilians^BG win the round"), "") MSG_CENTER_NOTIF(MMM_SLEUTH, N_ENABLE, 0, 0, "", CPID_MMM, "5 0", strcat(BOLD_OPERATOR, _("^BGYou are ^4Sleuth^BG! Find out who are murderers and protect the civilians!")), "") + MSG_CENTER_NOTIF(MMM_CORPSEDETECTION, N_ENABLE, 1, 0, "s1", CPID_MMM, "4 0", strcat(BOLD_OPERATOR, _("^BG%s")), "") MSG_CENTER_NOTIF(JOIN_PREVENT_MINIGAME, N_ENABLE, 0, 0, "", CPID_Null, "0 0", _("^K1Cannot join given minigame session!"), "" )