- fixed: userinfo_t needs a destructor to delete its CVARs when it is destroyed.

This commit is contained in:
Christoph Oelckers 2013-07-14 10:58:53 +02:00
parent e9be49f37d
commit 2d2498d1e2
2 changed files with 13 additions and 0 deletions

View file

@ -1048,3 +1048,14 @@ CCMD (playerinfo)
}
}
}
userinfo_t::~userinfo_t()
{
TMapIterator<FName, FBaseCVar *> it(*this);
TMap<FName, FBaseCVar *>::Pair *pair;
while (it.NextPair(pair))
{
delete pair->Value;
}
}

View file

@ -260,6 +260,8 @@ enum
struct userinfo_t : TMap<FName,FBaseCVar *>
{
~userinfo_t();
int GetAimDist() const
{
if (dmflags2 & DF2_NOAUTOAIM)