mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fixed memoryleak in CCollision
This commit is contained in:
parent
d3714f7efa
commit
7b3aba8fdc
|
@ -30,9 +30,17 @@ CCollision::CCollision()
|
|||
m_pTune = 0;
|
||||
}
|
||||
|
||||
CCollision::~CCollision()
|
||||
{
|
||||
if(m_pLayers)
|
||||
m_pLayers->Dest();
|
||||
Dest();
|
||||
}
|
||||
|
||||
void CCollision::Init(class CLayers *pLayers)
|
||||
{
|
||||
if(m_pLayers) m_pLayers->Dest();
|
||||
if(m_pLayers)
|
||||
m_pLayers->Dest();
|
||||
Dest();
|
||||
m_NumSwitchers = 0;
|
||||
m_pLayers = pLayers;
|
||||
|
|
|
@ -17,6 +17,7 @@ class CCollision
|
|||
|
||||
public:
|
||||
CCollision();
|
||||
~CCollision();
|
||||
void Init(class CLayers *pLayers);
|
||||
bool CheckPoint(float x, float y) { return IsSolid(round_to_int(x), round_to_int(y)); }
|
||||
bool CheckPoint(vec2 Pos) { return CheckPoint(Pos.x, Pos.y); }
|
||||
|
|
Loading…
Reference in a new issue