diff --git a/Minecraft.Client/Network/ClientConnection.cpp b/Minecraft.Client/Network/ClientConnection.cpp index 081fdfe9f..2143a9475 100644 --- a/Minecraft.Client/Network/ClientConnection.cpp +++ b/Minecraft.Client/Network/ClientConnection.cpp @@ -305,7 +305,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) //minecraft->setScreen(new ReceivingLevelScreen(this)); minecraft->player->entityId = packet->clientVersion; - BYTE networkSmallId = getSocket()->getSmallId(); + std::uint8_t networkSmallId = getSocket()->getSmallId(); app.UpdatePlayerInfo(networkSmallId, packet->m_playerIndex, packet->m_uiGamePrivileges); minecraft->player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_uiGamePrivileges); @@ -375,7 +375,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) player->setCustomCape( app.GetPlayerCapeId(m_userIndex) ); - BYTE networkSmallId = getSocket()->getSmallId(); + std::uint8_t networkSmallId = getSocket()->getSmallId(); app.UpdatePlayerInfo(networkSmallId, packet->m_playerIndex, packet->m_uiGamePrivileges); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_uiGamePrivileges); diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index bf55778fa..f0de38ee7 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -7816,7 +7816,7 @@ void CMinecraftApp::ClearTerrainFeaturePosition() } } -void CMinecraftApp::UpdatePlayerInfo(BYTE networkSmallId, SHORT playerColourIndex, unsigned int playerGamePrivileges) +void CMinecraftApp::UpdatePlayerInfo(std::uint8_t networkSmallId, SHORT playerColourIndex, unsigned int playerGamePrivileges) { for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i) { @@ -7833,7 +7833,7 @@ void CMinecraftApp::UpdatePlayerInfo(BYTE networkSmallId, SHORT playerColourInde } } -short CMinecraftApp::GetPlayerColour(BYTE networkSmallId) +short CMinecraftApp::GetPlayerColour(std::uint8_t networkSmallId) { short index = -1; for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i) @@ -7848,7 +7848,7 @@ short CMinecraftApp::GetPlayerColour(BYTE networkSmallId) } -unsigned int CMinecraftApp::GetPlayerPrivileges(BYTE networkSmallId) +unsigned int CMinecraftApp::GetPlayerPrivileges(std::uint8_t networkSmallId) { unsigned int privileges = 0; for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i) diff --git a/Minecraft.Client/Platform/Common/Consoles_App.h b/Minecraft.Client/Platform/Common/Consoles_App.h index 80a89ef33..3c21780cd 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.h +++ b/Minecraft.Client/Platform/Common/Consoles_App.h @@ -722,13 +722,13 @@ public: const wchar_t *GetGameRulesString(const std::wstring &key); private: - BYTE m_playerColours[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's + std::uint8_t m_playerColours[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's unsigned int m_playerGamePrivileges[MINECRAFT_NET_MAX_PLAYERS]; public: - void UpdatePlayerInfo(BYTE networkSmallId, SHORT playerColourIndex, unsigned int playerGamePrivileges); - short GetPlayerColour(BYTE networkSmallId); - unsigned int GetPlayerPrivileges(BYTE networkSmallId); + void UpdatePlayerInfo(std::uint8_t networkSmallId, SHORT playerColourIndex, unsigned int playerGamePrivileges); + short GetPlayerColour(std::uint8_t networkSmallId); + unsigned int GetPlayerPrivileges(std::uint8_t networkSmallId); std::wstring getEntityName(eINSTANCEOF type);