From b94607dc7ea6cb4f371920a03dca1be0c7373553 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 19 Apr 2012 04:03:42 +0000 Subject: [PATCH] - Being killed by a voodoo doll now has its own obituary, rather than trying to come up with one by treating it as a real player. SVN r3574 (trunk) --- src/p_interaction.cpp | 8 +++++++- wadsrc/static/language.enu | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 48cb87747..5fefa2ab5 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -192,7 +192,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker) gender = self->player->userinfo.gender; // Treat voodoo dolls as unknown deaths - if (inflictor && inflictor->player == self->player) + if (inflictor && inflictor->player && inflictor->player->mo != inflictor) MeansOfDeath = NAME_None; if (multiplayer && !deathmatch) @@ -228,6 +228,12 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker) case NAME_Fire: if (attacker == NULL) messagename = "OB_LAVA"; break; } + // Check for being killed by a voodoo doll. + if (inflictor && inflictor->player && inflictor->player->mo != inflictor) + { + messagename = "OB_VOODOO"; + } + if (messagename != NULL) message = GStrings(messagename); diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 4c1e4af69..927ed5e2b 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -620,6 +620,7 @@ OB_R_SPLASH = "%o should have stood back."; OB_ROCKET = "%o should have stood back."; OB_KILLEDSELF = "%o killed %hself."; +OB_VOODOO = "%o was kill by the power of voodoo."; OB_STEALTHBABY = "%o thought %g saw an arachnotron."; OB_STEALTHVILE = "%o thought %g saw an archvile."; OB_STEALTHBARON = "%o thought %g saw a Baron of Hell.";