mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix crashing on Mo(2) map, Thanks him
This commit is contained in:
parent
cdc2cfe220
commit
3f7c5c4413
|
@ -16,8 +16,8 @@ CGameControllerDDRace::CGameControllerDDRace(class CGameContext *pGameServer) :
|
||||||
CGameControllerDDRace::~CGameControllerDDRace()
|
CGameControllerDDRace::~CGameControllerDDRace()
|
||||||
{
|
{
|
||||||
//delete[] m_pTele1D;
|
//delete[] m_pTele1D;
|
||||||
//TODO make normal cleanup
|
//TODO make normal cleanup !!!!!!!!
|
||||||
delete[] m_pNumTele;
|
//delete[] m_pNumTele;
|
||||||
//m_pTele2D = 0x0;
|
//m_pTele2D = 0x0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,8 +75,8 @@ void CGameControllerDDRace::InitTeleporter()
|
||||||
//mem_zero(m_pTele1D, m_TotalTele*sizeof(vec2));
|
//mem_zero(m_pTele1D, m_TotalTele*sizeof(vec2));
|
||||||
|
|
||||||
//Please rewrite this place in next lines you broke all initialization
|
//Please rewrite this place in next lines you broke all initialization
|
||||||
m_pTele2D = new vec2 * [m_TotalTele];
|
m_pTele2D = new vec2 * [m_ArraySize];
|
||||||
for (int i = 0; i < m_TotalTele; ++i)
|
for (int i = 0; i < m_ArraySize; ++i)
|
||||||
{
|
{
|
||||||
m_pTele2D[i] = new vec2[m_pNumTele[i]];
|
m_pTele2D[i] = new vec2[m_pNumTele[i]];
|
||||||
mem_zero(m_pTele2D[i], m_pNumTele[i]*sizeof(vec2));
|
mem_zero(m_pTele2D[i], m_pNumTele[i]*sizeof(vec2));
|
||||||
|
|
Loading…
Reference in a new issue