From 0faeb1b5db51652ae3b9a2ff688a6b0d33eb8e72 Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Mon, 1 Jun 2020 01:33:17 +0200 Subject: [PATCH] [external/gamekit] Updated. Client and server now have different names in the log. --- external/gamekit | 2 +- source/client/core/ClientApplication.cpp | 2 ++ source/server/core/ServerApplication.cpp | 3 +++ source/server/core/ServerApplication.hpp | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/external/gamekit b/external/gamekit index 4adcb6eaf..9597bc8df 160000 --- a/external/gamekit +++ b/external/gamekit @@ -1 +1 @@ -Subproject commit 4adcb6eaf6e0a578cd230ec606d37a3fa146c487 +Subproject commit 9597bc8dfa840039447b218fb43de2891a48b82b diff --git a/source/client/core/ClientApplication.cpp b/source/client/core/ClientApplication.cpp index 9648255ac..c91da786c 100644 --- a/source/client/core/ClientApplication.cpp +++ b/source/client/core/ClientApplication.cpp @@ -55,6 +55,8 @@ void ClientApplication::init() { m_argumentParser.addArgument("working-dir", {"-w", "--working-dir", "Change the working direction to .", "dir"}); m_argumentParser.addArgument("texture-pack", {"-t", "--texture-pack", "Use texture pack .", "name"}); + m_loggerHandler.setName("client"); + gk::CoreApplication::init(); m_window.addVertexAttribute(VertexAttribute::Coord3d, "coord3d", 4, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast(offsetof(Vertex, coord3d))); diff --git a/source/server/core/ServerApplication.cpp b/source/server/core/ServerApplication.cpp index e8166ebf4..05367c280 100644 --- a/source/server/core/ServerApplication.cpp +++ b/source/server/core/ServerApplication.cpp @@ -60,6 +60,9 @@ ServerApplication::ServerApplication(gk::EventHandler &eventHandler) { void ServerApplication::init() { std::srand(std::time(nullptr)); + m_loggerHandler.setName("server"); + gk::LoggerHandler::setInstance(m_loggerHandler); + BlockGeometry::initOrientation(); m_argumentParser.addArgument("port", {"-p", "--port", "Select the port to use.", "port"}); diff --git a/source/server/core/ServerApplication.hpp b/source/server/core/ServerApplication.hpp index d7a04c719..42a706c99 100644 --- a/source/server/core/ServerApplication.hpp +++ b/source/server/core/ServerApplication.hpp @@ -64,6 +64,7 @@ class ServerApplication { gk::ArgumentParser m_argumentParser; gk::GameClock m_clock; gk::EventHandler *m_eventHandler = nullptr; + gk::LoggerHandler m_loggerHandler; Registry m_registry;