Revert "Merge branch 'discord'"

This reverts commit e7b9a57723, reversing
changes made to 02b4aa3c91.

Revert "moved rapidjson files"

This reverts commit f5012f770c.
This commit is contained in:
2023-06-21 23:30:35 +02:00
parent 1dde1dbf1e
commit 36f37b6548
57 changed files with 4 additions and 17185 deletions

View File

@@ -1,7 +1,6 @@
#include "game/client/ClientGame.h"
#include "protocol/PacketDispatcher.h"
#include "game/client/Client.h"
#include "misc/DiscordRPC.h"
namespace td {
namespace client {
@@ -98,7 +97,7 @@ void ClientGame::HandlePacket(const protocol::UpdateExpPacket* packet) {
}
void ClientGame::HandlePacket(const protocol::DisconnectPacket* packet) {
SetGameState(game::GameState::Disconnected);
m_GameState = game::GameState::Disconnected;
m_Renderer->SetBackgroundColor({ 0, 0, 0 });
}
@@ -115,30 +114,5 @@ void ClientGame::RenderWorld() {
}
}
void ClientGame::SetGameState(game::GameState newState) {
game::Game::SetGameState(newState);
// Update Discord presence
switch (newState) {
case game::GameState::Lobby:
utils::UpdateDiscordPresence("In Lobby", "Normal Mode", true);
break;
case game::GameState::Game:
utils::UpdateDiscordPresence("In Game", "Normal Mode", true);
break;
case game::GameState::Closed:
case game::GameState::Disconnected:
utils::UpdateDiscordPresence("In Main Menu", "Normal Mode", true);
break;
case game::GameState::EndGame:
utils::UpdateDiscordPresence("In End Game", "Normal Mode", true);
break;
}
}
} // namespace client
} // namespace td