- Fixed a crash when a player dies in damage floors.

This commit is contained in:
Edoardo Prezioso 2015-09-09 21:26:44 +02:00
parent 364ca11b43
commit 19c702a608

View file

@ -184,7 +184,6 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
const char *message;
const char *messagename;
char gendermessage[1024];
bool friendly;
int gender;
// No obituaries for non-players, voodoo dolls or when not wanted
@ -197,8 +196,6 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
if (inflictor && inflictor->player && inflictor->player->mo != inflictor)
MeansOfDeath = NAME_None;
friendly = (self->player != attacker->player && self->IsTeammate(attacker));
mod = MeansOfDeath;
message = NULL;
messagename = NULL;
@ -266,7 +263,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
if (message == NULL && attacker != NULL && attacker->player != NULL)
{
if (friendly)
if (self->player != attacker->player && self->IsTeammate(attacker))
{
self = attacker;
gender = self->player->userinfo.GetGender();