diff options
Diffstat (limited to 'src/game/server/gamecontext.cpp')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 7866e0f0..987ce64e 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -7,15 +7,13 @@ GAMECONTEXT game; GAMECONTEXT::GAMECONTEXT() { for(int i = 0; i < MAX_CLIENTS; i++) - { players[i] = 0; - /*players = new PLAYER(); - players[i].init(-1);*/ - } } GAMECONTEXT::~GAMECONTEXT() { + for(int i = 0; i < MAX_CLIENTS; i++) + delete players[i]; } void GAMECONTEXT::clear() @@ -23,15 +21,6 @@ void GAMECONTEXT::clear() this->~GAMECONTEXT(); mem_zero(this, sizeof(*this)); new (this) GAMECONTEXT(); - // reset all players - /* - for(int i = 0; i < MAX_CLIENTS; i++) - players[i].init(-1); - - world.~GAMEWORLD(); - mem_zero(&world, sizeof(world)); - world.GAMEWORLD(); - */ } |