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/GameState.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/GameState.cpp') diff --git a/src/GameState.cpp b/src/GameState.cpp index 3020bde..945824f 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -113,8 +113,12 @@ void GameState::UpdatePacket(NetworkClient *nc) break; case TabCompleteCB: break; - case ChatMessageCB: + case ChatMessageCB: { + auto packet = std::static_pointer_cast(ptr); + LOG(INFO) << "Message (" << int(packet->Position) << "): " << packet->JsonData.text; + EventAgregator::PushEvent(EventType::ChatMessageReceived, ChatMessageReceivedData{ packet->JsonData,packet->Position }); break; + } case MultiBlockChange: { auto packet = std::static_pointer_cast(ptr); world.ParseChunkData(packet); -- cgit v1.2.3