From 469a84c10ba60fba4a513c1b1a0eea600cd7b22f Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 10 May 2017 18:44:51 +0500 Subject: 2017-05-10 --- Game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Game.cpp') diff --git a/Game.cpp b/Game.cpp index c3adaae..fcb8582 100644 --- a/Game.cpp +++ b/Game.cpp @@ -4,7 +4,7 @@ #include "json.hpp" Game::Game() { - m_display = new Display(1280, 720, "AltCraft", &m_world, gameStartWaiter); + m_display = new Display(1280, 720, "AltCraft", &m_world); m_nc = new NetworkClient("127.0.0.1", 25565, "HelloOne"); Packet &response = *m_nc->GetPacket(); if (response.GetId() != 0x02) { @@ -21,6 +21,7 @@ Game::Game() { Game::~Game() { std::cout << "Stopping game thread..." << std::endl; + m_exit=true; m_gameThread.join(); std::cout << "Stopping graphics..." << std::endl; delete m_display; @@ -29,7 +30,6 @@ Game::~Game() { } void Game::MainLoop() { - //std::thread(std::this_thread::get_id()).swap(m_display->GetThreadHandler()); while (!m_exit) { ParsePackets(); if (m_display->IsClosed()) -- cgit v1.2.3