From 7bb460ab7274c46019315cf9aba1d308189ab0de Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Fri, 12 Jan 2018 11:56:07 +0500 Subject: Fixed some incorrect types for events --- src/GlobalState.cpp | 4 ++-- src/Render.cpp | 4 ++-- src/RendererWorld.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/GlobalState.cpp b/src/GlobalState.cpp index e947e01..f04bb35 100644 --- a/src/GlobalState.cpp +++ b/src/GlobalState.cpp @@ -143,10 +143,10 @@ void PhysExec() { } }); - listener.RegisterHandler("MouseMoved", [](const Event& eventData) { + listener.RegisterHandler("MouseMove", [](const Event& eventData) { if (!gs) return; - auto data = eventData.get>(); + auto data = eventData.get>(); gs->HandleRotation(std::get<0>(data),std::get<1>(data)); }); diff --git a/src/Render.cpp b/src/Render.cpp index 3daa8ff..c3fe137 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -283,8 +283,8 @@ void Render::ExecuteRenderLoop() { }); listener.RegisterHandler("ChatMessageReceived", [this](const Event& eventData) { - auto data = eventData.get>(); - std::string msg = "(" + std::to_string((int)std::get<1>(data)) + ") " + std::get<0>(data); + auto data = eventData.get>(); + std::string msg = "(" + std::to_string((int)std::get<1>(data)) + ") " + std::get<0>(data).text; chatMessages.push_back(msg); }); diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp index b9745be..88d289f 100644 --- a/src/RendererWorld.cpp +++ b/src/RendererWorld.cpp @@ -83,7 +83,7 @@ void RendererWorld::UpdateAllSections(VectorF playerPos) sectionsMutex.unlock(); for (auto& it : toRemove) { - PUSH_EVENT("DeleteSectionRender", 0); + PUSH_EVENT("DeleteSectionRender", it); } playerChunk.y = std::floor(gs->player->pos.y / 16.0); -- cgit v1.2.3