- 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

@ -301,82 +301,6 @@ CCMD (playerclasses)
// 16 pixels of bob
#define MAXBOB 16.
// The player_t constructor. Since LogText is not a POD, we cannot just
// memset it all to 0.
player_t::player_t()
: mo(0),
playerstate(0),
cls(0),
DesiredFOV(0),
FOV(0),
viewz(0),
viewheight(0),
deltaviewheight(0),
bob(0),
Vel(0, 0),
centering(0),
turnticks(0),
attackdown(0),
usedown(0),
oldbuttons(0),
health(0),
inventorytics(0),
CurrentPlayerClass(0),
fragcount(0),
lastkilltime(0),
multicount(0),
spreecount(0),
WeaponState(0),
ReadyWeapon(0),
PendingWeapon(0),
psprites(0),
cheats(0),
timefreezer(0),
refire(0),
inconsistant(0),
killcount(0),
itemcount(0),
secretcount(0),
damagecount(0),
bonuscount(0),
hazardcount(0),
poisoncount(0),
poisoner(0),
attacker(0),
extralight(0),
morphTics(0),
MorphedPlayerClass(0),
MorphStyle(0),
MorphExitFlash(0),
PremorphWeapon(0),
chickenPeck(0),
jumpTics(0),
onground(0),
respawn_time(0),
camera(0),
air_finished(0),
MUSINFOactor(0),
MUSINFOtics(-1),
crouching(0),
crouchdir(0),
Bot(0),
BlendR(0),
BlendG(0),
BlendB(0),
BlendA(0),
LogText(),
crouchfactor(0),
crouchoffset(0),
crouchviewdelta(0),
ConversationNPC(0),
ConversationPC(0),
ConversationNPCAngle(0.),
ConversationFaceTalker(0)
{
memset (&cmd, 0, sizeof(cmd));
memset (frags, 0, sizeof(frags));
}
player_t::~player_t()
{
DestroyPSprites();