Skip to content

Commit

Permalink
fix: server admin console now relies exclusively on xmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashi committed Jan 11, 2022
1 parent 2d4defa commit b2304a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
13 changes: 4 additions & 9 deletions Code/admin/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
add_requires("vcpkg::magnum")
add_requires("vcpkg::sdl2")
add_requires("vcpkg::magnum-integration[imgui]")
add_requires("vcpkg::corrade")
add_requires("magnum", { configs = { sdl2 = true }})
add_requires("magnum-integration", { configs = { imgui = true }})

target("Admin")
set_kind("binary")
Expand Down Expand Up @@ -29,9 +27,6 @@ target("Admin")
"spdlog",
"hopscotch-map",
"glm",
"vcpkg::corrade",
"vcpkg::magnum",
"vcpkg::magnum-integration[imgui]",
"imgui",
"vcpkg::sdl2",
"magnum",
"magnum-integration",
"gamenetworkingsockets")
8 changes: 4 additions & 4 deletions Code/server/GameServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ GameServer::GameServer(uint16_t aPort, bool aPremium, String aName, String aToke
return false;
};

//ClientAdminMessageFactory::Visit(adminHandlerGenerator);
ClientAdminMessageFactory::Visit(adminHandlerGenerator);
}

GameServer::~GameServer()
Expand Down Expand Up @@ -133,15 +133,15 @@ void GameServer::OnConsume(const void* apData, const uint32_t aSize, const Conne

if (m_adminSessions.contains(aConnectionId)) [[unlikely]]
{
/* const ClientAdminMessageFactory factory;
const ClientAdminMessageFactory factory;
auto pMessage = factory.Extract(reader);
if (!pMessage)
{
spdlog::error("Couldn't parse packet from {:x}", aConnectionId);
return;
}*/
}

//m_adminMessageHandlers[pMessage->GetOpcode()](pMessage, aConnectionId);
m_adminMessageHandlers[pMessage->GetOpcode()](pMessage, aConnectionId);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Code/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if is_plat("windows") then
includes("client")
includes("immersive_launcher")
includes("tp_process")
--includes("admin")
includes("admin")
end

includes("common")
Expand Down

0 comments on commit b2304a4

Please sign in to comment.