mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fixed gamertag being blank upon renaming and re-joining a save
This commit is contained in:
parent
ff75e8f6e1
commit
d4ef7b0894
|
|
@ -2,6 +2,7 @@
|
||||||
#include "UI.h"
|
#include "UI.h"
|
||||||
#include "UIScene_LoadMenu.h"
|
#include "UIScene_LoadMenu.h"
|
||||||
#include "..\..\Minecraft.h"
|
#include "..\..\Minecraft.h"
|
||||||
|
#include "..\..\User.h"
|
||||||
#include "..\..\TexturePackRepository.h"
|
#include "..\..\TexturePackRepository.h"
|
||||||
#include "..\..\Options.h"
|
#include "..\..\Options.h"
|
||||||
#include "..\..\MinecraftServer.h"
|
#include "..\..\MinecraftServer.h"
|
||||||
|
|
@ -273,7 +274,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
||||||
m_bIgnoreInput = false;
|
m_bIgnoreInput = false;
|
||||||
|
|
||||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||||
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
|
unsigned int texturePacksCount = (unsigned int)pMinecraft->skins->getTexturePackCount();
|
||||||
for(unsigned int i = 0; i < texturePacksCount; ++i)
|
for(unsigned int i = 0; i < texturePacksCount; ++i)
|
||||||
{
|
{
|
||||||
TexturePack *tp = pMinecraft->skins->getTexturePackByIndex(i);
|
TexturePack *tp = pMinecraft->skins->getTexturePackByIndex(i);
|
||||||
|
|
@ -1629,6 +1630,12 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocal
|
||||||
|
|
||||||
param->settings = app.GetGameHostOption( eGameHostOption_All );
|
param->settings = app.GetGameHostOption( eGameHostOption_All );
|
||||||
|
|
||||||
|
#ifdef _WINDOWS64
|
||||||
|
{
|
||||||
|
extern wchar_t g_Win64UsernameW[17];
|
||||||
|
Minecraft::GetInstance()->user->name = g_Win64UsernameW;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
g_NetworkManager.FakeLocalPlayerJoined();
|
g_NetworkManager.FakeLocalPlayerJoined();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -329,6 +329,10 @@ void IQNet::EndGame()
|
||||||
m_player[i].m_gamertag[0] = 0;
|
m_player[i].m_gamertag[0] = 0;
|
||||||
m_player[i].SetCustomDataValue(0);
|
m_player[i].SetCustomDataValue(0);
|
||||||
}
|
}
|
||||||
|
// Restore local player 0's gamertag so re-joining works correctly
|
||||||
|
extern wchar_t g_Win64UsernameW[17];
|
||||||
|
m_player[0].m_isHostPlayer = true;
|
||||||
|
wcscpy_s(m_player[0].m_gamertag, 32, g_Win64UsernameW);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; }
|
DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue