fix: hack around DLC loading to get ingame

This commit is contained in:
Tropical 2026-03-13 00:33:23 -05:00
parent f4445fd709
commit 669e75701b
7 changed files with 28 additions and 35 deletions

View file

@ -272,10 +272,10 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, void *lpParamet
app.DebugPrintf("[NET] DLC check: completed=%d pending=%d\n", app.DLCInstallProcessCompleted(), app.DLCInstallPending());
// 4J Stu - Wait a while to make sure that DLC is loaded. This is the last point before the network communication starts
// so the latest we can check this
while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() )
{
Sleep( 10 );
}
// while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() )
// {
// Sleep( 10 );
// }
if( g_NetworkManager.IsLeavingGame() )
{
MinecraftServer::HaltServer();

View file

@ -182,12 +182,12 @@ void UIScene_Intro::tick()
// Auto-skip the intro after 60 ticks (~2 seconds at 30fps)
// since we have no SWF renderer to play the intro animation
s_introTickCount++;
if(s_introTickCount == 60 && !m_bIgnoreNavigate)
{
fprintf(stderr, "[Linux] Auto-skipping intro -> MainMenu after %d ticks\n", s_introTickCount);
m_bIgnoreNavigate = true;
// Skip straight to MainMenu, bypassing SaveMessage (no SWF interaction possible)
ui.NavigateToScene(0, eUIScene_MainMenu);
}
// if(s_introTickCount == 60 && !m_bIgnoreNavigate)
// {
// fprintf(stderr, "[Linux] Auto-skipping intro -> MainMenu after %d ticks\n", s_introTickCount);
// m_bIgnoreNavigate = true;
// // Skip straight to MainMenu, bypassing SaveMessage (no SWF interaction possible)
// ui.NavigateToScene(0, eUIScene_MainMenu);
// }
}
#endif

View file

@ -955,10 +955,10 @@ void UIScene_LoadOrJoinMenu::AddDefaultButtons()
void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
{
if(m_bIgnoreInput) return;
// if(m_bIgnoreInput) return;
// if we're retrieving save info, ignore key presses
if(!m_bSavesDisplayed) return;
// if(!m_bSavesDisplayed) return;
ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released);

View file

@ -1804,15 +1804,15 @@ void UIScene_MainMenu::tick()
#ifdef __linux__
{
static int s_mainMenuTickCount = 0;
s_mainMenuTickCount++;
if(s_mainMenuTickCount % 60 == 1) { fprintf(stderr, "[MM] tick %d\n", s_mainMenuTickCount); fflush(stderr); }
if(s_mainMenuTickCount == 90) // ~3 seconds at 30fps
{
fprintf(stderr, "[Linux] Auto-starting trial world from MainMenu after %d ticks\n", s_mainMenuTickCount);
LoadTrial();
return;
}
// static int s_mainMenuTickCount = 0;
// s_mainMenuTickCount++;
// if(s_mainMenuTickCount % 60 == 1) { fprintf(stderr, "[MM] tick %d\n", s_mainMenuTickCount); fflush(stderr); }
// if(s_mainMenuTickCount == 90) // ~3 seconds at 30fps
// {
// fprintf(stderr, "[Linux] Auto-starting trial world from MainMenu after %d ticks\n", s_mainMenuTickCount);
// LoadTrial();
// return;
// }
}
#endif

View file

@ -267,7 +267,6 @@ typedef struct _LaunchMoreOptionsMenuInitData
_LaunchMoreOptionsMenuInitData()
{
memset((void*)this,0,sizeof(_LaunchMoreOptionsMenuInitData));
bOnlineGame = true;
bAllowFriendsOfFriends = true;
bPVP = true;

View file

@ -783,11 +783,9 @@ g_NetworkManager.DoWork();
PIXEndNamedEvent();
// Render game graphics.
// On Linux, always call run_middle() so mc->screen (TitleScreen etc.) renders
// even when the game session has not yet started (Iggy Flash UI is unavailable).
pMinecraft->run_middle();
if(app.GetGameStarted())
{
pMinecraft->run_middle();
app.SetAppPaused( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()) );
}
else

View file

@ -24,18 +24,14 @@ void ConsoleUIController::init(S32 w, S32 h)
if (!gdraw_funcs)
{
app.DebugPrintf("Failed to initialise GDraw GL!\n");
fprintf(stderr, "[Linux_UIController] Failed to initialise GDraw GL!\n");
// nott fatal for now
app.FatalLoadError();
}
else
{
gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_vertexbuffer, 5000, 16 * 1024 * 1024);
gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_texture, 5000, 128 * 1024 * 1024);
gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_rendertarget, 10, 32 * 1024 * 1024);
gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_vertexbuffer, 5000, 16 * 1024 * 1024);
gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_texture, 5000, 128 * 1024 * 1024);
gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_rendertarget, 10, 32 * 1024 * 1024);
IggySetGDraw(gdraw_funcs);
}
IggySetGDraw(gdraw_funcs);
postInit();
#endif