From abba018da3c2c8011b1485ee8e9e5b2690659c76 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 14 Oct 2017 21:40:34 +0500 Subject: 2017-10-14 --- src/GlobalState.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/GlobalState.cpp') diff --git a/src/GlobalState.cpp b/src/GlobalState.cpp index 49dbf2b..78fba0e 100644 --- a/src/GlobalState.cpp +++ b/src/GlobalState.cpp @@ -78,13 +78,16 @@ void InitEvents() { }); listener.RegisterHandler(EventType::Disconnected, [](EventData eventData) { - std::this_thread::sleep_for(std::chrono::milliseconds(500)); if (!gs) return; isPhysRunning = false; threadPhys.join(); gs.reset(); }); + + listener.RegisterHandler(EventType::SendChatMessage, [](EventData eventData) { + nc->SendPacket(std::make_shared(std::get(eventData).message)); + }); } void PhysExec() { -- cgit v1.2.3