- fixed: Suicides could count towards multikills (patch by edward850)

SVN r3632 (trunk)
This commit is contained in:
Christoph Oelckers 2012-05-08 12:27:01 +00:00
parent 206ffd936f
commit 898232be61

View file

@ -518,53 +518,56 @@ void AActor::Die (AActor *source, AActor *inflictor)
} }
// [RH] Multikills // [RH] Multikills
source->player->multicount++; if (player != source->player)
if (source->player->lastkilltime > 0)
{ {
if (source->player->lastkilltime < level.time - 3*TICRATE) source->player->multicount++;
if (source->player->lastkilltime > 0)
{ {
source->player->multicount = 1; if (source->player->lastkilltime < level.time - 3*TICRATE)
}
if (deathmatch &&
source->CheckLocalView (consoleplayer) &&
cl_showmultikills)
{
const char *multimsg;
switch (source->player->multicount)
{ {
case 1: source->player->multicount = 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)) if (deathmatch &&
source->CheckLocalView (consoleplayer) &&
cl_showmultikills)
{
const char *multimsg;
switch (source->player->multicount)
{ {
SexMessage (multimsg, buff, player->userinfo.gender, case 1:
player->userinfo.netname, source->player->userinfo.netname); multimsg = NULL;
StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff, break;
1.5f, 0.8f, 0, 0, CR_RED, 3.f, 0.5f), MAKE_ID('M','K','I','L')); 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 // [RH] Implement fraglimit
if (deathmatch && fraglimit && if (deathmatch && fraglimit &&