Added a check that doesn't print empty obituary strings, as wad's that hide obituary strings in multiplayer games end up spamming a lot of empty lines.

This commit is contained in:
WChrisK 2014-06-11 23:30:25 -04:00
parent 842ef86e73
commit 67c6690689

View file

@ -320,6 +320,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
message = GStrings("OB_DEFAULT"); message = GStrings("OB_DEFAULT");
} }
// [CK] Don't display empty strings
if (message == NULL || strlen(message) <= 0)
return;
SexMessage (message, gendermessage, gender, SexMessage (message, gendermessage, gender,
self->player->userinfo.GetName(), attacker->player->userinfo.GetName()); self->player->userinfo.GetName(), attacker->player->userinfo.GetName());
Printf (PRINT_MEDIUM, "%s\n", gendermessage); Printf (PRINT_MEDIUM, "%s\n", gendermessage);