- 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:
Christoph Oelckers 2018-08-19 01:14:15 +02:00
commit fad406c4c9
47 changed files with 185 additions and 309 deletions

View file

@ -569,9 +569,8 @@ DEFINE_PROPERTY(painchance, ZI, Actor)
}
else
{
FName painType;
if (!stricmp(str, "Normal")) painType = NAME_None;
else painType=str;
FName painType = NAME_None;
if (stricmp(str, "Normal")) painType = str;
info->SetPainChance(painType, id);
}
@ -897,15 +896,14 @@ DEFINE_PROPERTY(damagefactor, ZF, Actor)
PROP_STRING_PARM(str, 0);
PROP_DOUBLE_PARM(id, 1);
if (str == NULL)
if (str == nullptr)
{
defaults->DamageFactor = id;
}
else
{
FName dmgType;
if (!stricmp(str, "Normal")) dmgType = NAME_None;
else dmgType=str;
FName dmgType = NAME_None;
if (stricmp(str, "Normal")) dmgType = str;
info->SetDamageFactor(dmgType, id);
}