]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix and improvement of Corpse Detection info
authorLegendaryGuard <rootuser999@gmail.com>
Sun, 11 Apr 2021 23:59:34 +0000 (01:59 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Sun, 11 Apr 2021 23:59:34 +0000 (01:59 +0200)
qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc
qcsrc/common/notifications/all.inc

index 1a374e51cfc1442af23e12398eda117110cc2d29..19a3f94f2d9cd238b5197dea0407c731d30e0249 100644 (file)
@@ -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;
                }
index 0d2026a63775870b8973aeada02f4410e501a9eb..32273000d72b5400620570e1791ee610a1971fcd 100644 (file)
@@ -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!"), "" )