mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed: userinfo_t needs a destructor to delete its CVARs when it is destroyed.
This commit is contained in:
parent
e9be49f37d
commit
2d2498d1e2
2 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -260,6 +260,8 @@ enum
|
||||||
|
|
||||||
struct userinfo_t : TMap<FName,FBaseCVar *>
|
struct userinfo_t : TMap<FName,FBaseCVar *>
|
||||||
{
|
{
|
||||||
|
~userinfo_t();
|
||||||
|
|
||||||
int GetAimDist() const
|
int GetAimDist() const
|
||||||
{
|
{
|
||||||
if (dmflags2 & DF2_NOAUTOAIM)
|
if (dmflags2 & DF2_NOAUTOAIM)
|
||||||
|
|
Loading…
Reference in a new issue