Fix draggers

This commit is contained in:
Dennis Felsing 2019-04-17 12:58:53 +02:00
parent 9f3df78cae
commit b425495f45
2 changed files with 11 additions and 8 deletions

View file

@ -7,6 +7,7 @@
#include <game/server/teams.h>
#include <game/server/gamemodes/DDRace.h>
#include "dragger.h"
#include <iostream>
CDragger::CDragger(CGameWorld *pGameWorld, vec2 Pos, float Strength, bool NW,
int CaughtTeam, int Layer, int Number) :
@ -390,16 +391,18 @@ void CDragger::Snap(int SnappingClient)
CDraggerTeam::CDraggerTeam(CGameWorld *pGameWorld, vec2 Pos, float Strength,
bool NW, int Layer, int Number)
{
std::cout << "CREATING" << std::endl;
for (int i = 0; i < MAX_CLIENTS; ++i)
{
m_Draggers[i] = new CDragger(pGameWorld, Pos, Strength, NW, i, Layer, Number);
}
}
CDraggerTeam::~CDraggerTeam()
{
for (int i = 0; i < MAX_CLIENTS; ++i)
{
delete m_Draggers[i];
}
}
//CDraggerTeam::~CDraggerTeam()
//{
// std::cout << "DELETING" << std::endl;
// for (int i = 0; i < MAX_CLIENTS; ++i)
// {
// delete m_Draggers[i];
// }
//}

View file

@ -36,7 +36,7 @@ public:
CDraggerTeam(CGameWorld *pGameWorld, vec2 Pos, float Strength, bool NW =
false, int Layer = 0, int Number = 0);
~CDraggerTeam();
//~CDraggerTeam();
};
#endif // GAME_SERVER_ENTITIES_DRAGGER_H