From 898232be61b9c12363f7826551bb138b3a9ca8cf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 May 2012 12:27:01 +0000 Subject: [PATCH] - fixed: Suicides could count towards multikills (patch by edward850) SVN r3632 (trunk) --- src/p_interaction.cpp | 77 ++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 5fefa2ab5..4190b33f3 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -518,53 +518,56 @@ void AActor::Die (AActor *source, AActor *inflictor) } // [RH] Multikills - source->player->multicount++; - if (source->player->lastkilltime > 0) + if (player != source->player) { - if (source->player->lastkilltime < level.time - 3*TICRATE) + source->player->multicount++; + if (source->player->lastkilltime > 0) { - source->player->multicount = 1; - } - - if (deathmatch && - source->CheckLocalView (consoleplayer) && - cl_showmultikills) - { - const char *multimsg; - - switch (source->player->multicount) + if (source->player->lastkilltime < level.time - 3*TICRATE) { - case 1: - multimsg = NULL; - break; - case 2: - multimsg = GStrings("MULTI2"); - break; - case 3: - multimsg = GStrings("MULTI3"); - break; - case 4: - multimsg = GStrings("MULTI4"); - break; - default: - multimsg = GStrings("MULTI5"); - break; + source->player->multicount = 1; } - if (multimsg != NULL) - { - char buff[256]; - if (!AnnounceMultikill (source)) + if (deathmatch && + source->CheckLocalView (consoleplayer) && + cl_showmultikills) + { + const char *multimsg; + + switch (source->player->multicount) { - SexMessage (multimsg, buff, player->userinfo.gender, - player->userinfo.netname, source->player->userinfo.netname); - StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff, - 1.5f, 0.8f, 0, 0, CR_RED, 3.f, 0.5f), MAKE_ID('M','K','I','L')); + case 1: + multimsg = NULL; + break; + case 2: + multimsg = GStrings("MULTI2"); + break; + case 3: + multimsg = GStrings("MULTI3"); + break; + case 4: + multimsg = GStrings("MULTI4"); + break; + default: + multimsg = GStrings("MULTI5"); + break; + } + if (multimsg != NULL) + { + char buff[256]; + + if (!AnnounceMultikill (source)) + { + SexMessage (multimsg, buff, player->userinfo.gender, + player->userinfo.netname, source->player->userinfo.netname); + StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff, + 1.5f, 0.8f, 0, 0, CR_RED, 3.f, 0.5f), MAKE_ID('M','K','I','L')); + } } } } + source->player->lastkilltime = level.time; } - source->player->lastkilltime = level.time; // [RH] Implement fraglimit if (deathmatch && fraglimit &&