- got rid of FNameNoInit and made the default constructor of FName non-initializing.
This setup has been a constant source of problems so now I reviewed all uses of FName to make sure that everything that needs to be initialized is done manually. This also merges the player_t constructor into the class definition as default values.
This commit is contained in:
parent
34f2d8f310
commit
fad406c4c9
47 changed files with 185 additions and 309 deletions
|
|
@ -182,25 +182,22 @@ void SexMessage (const char *from, char *to, int gender, const char *victim, con
|
|||
//
|
||||
void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgflags, FName MeansOfDeath)
|
||||
{
|
||||
FName mod;
|
||||
FString ret;
|
||||
const char *message;
|
||||
const char *messagename;
|
||||
char gendermessage[1024];
|
||||
|
||||
// No obituaries for non-players, voodoo dolls or when not wanted
|
||||
if (self->player == NULL || self->player->mo != self || !show_obituaries)
|
||||
if (self->player == nullptr || self->player->mo != self || !show_obituaries)
|
||||
return;
|
||||
|
||||
// Treat voodoo dolls as unknown deaths
|
||||
if (inflictor && inflictor->player && inflictor->player->mo != inflictor)
|
||||
MeansOfDeath = NAME_None;
|
||||
|
||||
mod = MeansOfDeath;
|
||||
message = NULL;
|
||||
messagename = NULL;
|
||||
FName mod = MeansOfDeath;
|
||||
const char *message = nullptr;
|
||||
const char *messagename = nullptr;
|
||||
|
||||
if (attacker == NULL || attacker->player != NULL)
|
||||
if (attacker == nullptr || attacker->player != nullptr)
|
||||
{
|
||||
if (mod == NAME_Telefrag)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue