summaryrefslogtreecommitdiffstats
path: root/Game.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-10 15:44:51 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-10 15:44:51 +0200
commit469a84c10ba60fba4a513c1b1a0eea600cd7b22f (patch)
tree4de3514353341f68fd63d3c12fa0a162008d3209 /Game.cpp
parent2017-04-23 (diff)
downloadAltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.tar
AltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.tar.gz
AltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.tar.bz2
AltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.tar.lz
AltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.tar.xz
AltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.tar.zst
AltCraft-469a84c10ba60fba4a513c1b1a0eea600cd7b22f.zip
Diffstat (limited to '')
-rw-r--r--Game.cpp4
1 files changed, 2 insertions, 2 deletions
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())