diff --git a/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp b/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp index 2363fee0e..3773d336f 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp @@ -147,8 +147,6 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, DWORD skinId = app.getSkinIdFromPath(m_path); app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask); break; - default: - break; } } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp index 2c36ac7b2..24dc60826 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp @@ -868,7 +868,7 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return; } #endif - unsigned int uiIDA[2]; + unsigned int uiIDA[2]; if (m_bGameModeCreative == true || m_MoreOptionsParams.bHostPrivileges == TRUE) { uiIDA[0] = IDS_CONFIRM_OK; @@ -1202,7 +1202,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, (EGameHostOptionWorldSize)(pClass->m_MoreOptionsParams.worldSize + 1); #endif - g_NetworkManager.HostGame(dwLocalUsersMask, isClientSide, isPrivate, + g_NetworkManager.HostGame(localUsersMask, isClientSide, isPrivate, MINECRAFT_NET_MAX_PLAYERS, 0); param->settings = app.GetGameHostOption(eGameHostOption_All); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h index a38d3e8ef..53ac3e4c5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h @@ -91,8 +91,7 @@ protected: void handlePress(F64 controlId, F64 childId); void handleSliderMove(F64 sliderId, F64 currentValue); - static void CreateGame(UIScene_CreateWorldMenu* pClass, - DWORD dwLocalUsersMask); + static void CreateGame(UIScene_CreateWorldMenu* pClass, INT LocalUsersMask); static int ConfirmCreateReturned(void* pParam, int iPad, C4JStorage::EMessageResult result); static int StartGame_SignInReturned(void* pParam, bool bContinue, int iPad); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp index 6adb5fa6f..f34c4afae 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp @@ -355,9 +355,9 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId) { InGamePlayerOptionsInitData* pInitData = new InGamePlayerOptionsInitData(); pInitData->iPad = m_iPad; - pInitData->networkSmallId = m_players[currentSelection]; + pInitData->networkSmallId = m_players[currentSelection]->m_smallId; pInitData->playerPrivileges = - app.GetPlayerPrivileges(m_players[currentSelection]); + app.GetPlayerPrivileges(m_players[currentSelection]->m_smallId); pInitData->playerPrivileges = app.GetPlayerPrivileges( m_players[currentSelection]->m_smallId); ui.NavigateToScene(m_iPad, eUIScene_InGamePlayerOptionsMenu, @@ -368,7 +368,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId) { // Only ops will hit this, can kick anyone not local and not // local to the host std::uint8_t* smallId = new std::uint8_t(); - *smallId = m_players[currentSelection]; + *smallId = m_players[currentSelection]->m_smallId; unsigned int uiIDA[2]; uiIDA[0] = IDS_CONFIRM_OK; uiIDA[1] = IDS_CONFIRM_CANCEL; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp index 8def712e8..9c345a710 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp @@ -514,7 +514,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { pClass->m_bIgnoreInput = false; int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; - if (dwSignedInUsers > 1) + if (signedInUsers > 1) messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_ALL_LOCAL; ui.RequestUGCMessageBox(IDS_CONNECTION_FAILED, messageText); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp index 5eff02e6f..af50607da 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp @@ -513,51 +513,50 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) { m_currentPack->getPurchaseOfferId(); } - // tell sentient about the upsell of the full - // version of the skin pack - SentientManager.RecordUpsellPresented( - iPad, eSet_UpsellID_Skin_DLC, - ullOfferID_Full & 0xFFFFFFFF); + // tell sentient about the upsell of the full + // version of the skin pack + SentientManager.RecordUpsellPresented( + iPad, eSet_UpsellID_Skin_DLC, + ullOfferID_Full & 0xFFFFFFFF); #endif - bool bContentRestricted = false; + bool bContentRestricted = false; #if defined(__PS3__) || defined(__PSVITA__) - ProfileManager.GetChatAndContentRestrictions( - m_iPad, true, NULL, &bContentRestricted, NULL); + ProfileManager.GetChatAndContentRestrictions( + m_iPad, true, NULL, &bContentRestricted, + NULL); #endif - if (bContentRestricted) { + if (bContentRestricted) { #if !(defined(_XBOX) || \ defined( \ _WIN64)) // 4J Stu - Temp to get the win build running, but so we // check this for other platforms you can't see the store - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestMessageBox( - IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, this, - app.GetStringTable(), NULL, 0, false); + unsigned int uiIDA[1]; + uiIDA[0] = IDS_CONFIRM_OK; + ui.RequestAlertMessage( + IDS_ONLINE_SERVICE_TITLE, + IDS_CONTENT_RESTRICTION, uiIDA, 1, + iPad); #endif - } else { - // 4J-PB - need to check for an empty store + } else { + // 4J-PB - need to check for an empty store #if defined __ORBIS__ || defined __PSVITA__ || defined __PS3__ - if (app.CheckForEmptyStore(iPad) == false) + if (app.CheckForEmptyStore(iPad) == false) #endif - { - m_bIgnoreInput = true; - renableInputAfterOperation = false; + { + m_bIgnoreInput = true; + renableInputAfterOperation = false; - unsigned int uiIDA[2] = { - IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL}; - ui.RequestMessageBox( - IDS_UNLOCK_DLC_TITLE, - IDS_UNLOCK_DLC_SKIN, uiIDA, 2, iPad, - &UIScene_SkinSelectMenu:: - UnlockSkinReturned, - this, app.GetStringTable(), NULL, 0, - false); + unsigned int uiIDA[2] = { + IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL}; + ui.RequestAlertMessage( + IDS_UNLOCK_DLC_TITLE, + IDS_UNLOCK_DLC_SKIN, uiIDA, 2, iPad, + &UIScene_SkinSelectMenu:: + UnlockSkinReturned, + this); + } } } - } } else { app.SetPlayerSkin(iPad, skinFile->getPath()); app.SetPlayerCape(iPad, diff --git a/Minecraft.Client/Platform/Linux/linux_game_stubs.cpp b/Minecraft.Client/Platform/Linux/linux_game_stubs.cpp index e8f5bd3a0..f9d43abce 100644 --- a/Minecraft.Client/Platform/Linux/linux_game_stubs.cpp +++ b/Minecraft.Client/Platform/Linux/linux_game_stubs.cpp @@ -19,11 +19,13 @@ void PIXSetMarkerDeprecated(int a, const char* b, ...) {} #include "../Xbox/Network/NetworkPlayerXbox.h" NetworkPlayerXbox::NetworkPlayerXbox(IQNetPlayer* p) - : m_qnetPlayer(p), m_pSocket(nullptr) {} + : m_qnetPlayer(p), m_pSocket(nullptr), m_lastChunkPacketTime(0) {} IQNetPlayer* NetworkPlayerXbox::GetQNetPlayer() { return m_qnetPlayer; } unsigned char NetworkPlayerXbox::GetSmallId() { return 0; } -void NetworkPlayerXbox::SendData(INetworkPlayer*, const void*, int, bool) {} +void NetworkPlayerXbox::SendData(INetworkPlayer* player, const void* pvData, int dataSize, + bool lowPriority, bool ack) {} bool NetworkPlayerXbox::IsSameSystem(INetworkPlayer*) { return false; } +int NetworkPlayerXbox::GetOutstandingAckCount() { return 0; } int NetworkPlayerXbox::GetSendQueueSizeBytes(INetworkPlayer*, bool) { return 0; } @@ -45,5 +47,17 @@ Socket* NetworkPlayerXbox::GetSocket() { return m_pSocket; } const wchar_t* NetworkPlayerXbox::GetOnlineName() { return L"Player"; } std::wstring NetworkPlayerXbox::GetDisplayName() { return L"Player"; } PlayerUID NetworkPlayerXbox::GetUID() { return PlayerUID(); } +void NetworkPlayerXbox::SentChunkPacket() { + m_lastChunkPacketTime = System::currentTimeMillis(); +} +int NetworkPlayerXbox::GetTimeSinceLastChunkPacket_ms() { + // If we haven't ever sent a packet, return maximum + if (m_lastChunkPacketTime == 0) { + return INT_MAX; + } + + int64_t currentTime = System::currentTimeMillis(); + return (int)(currentTime - m_lastChunkPacketTime); +} #endif