Fix end poem crash

Removed player name check that always fails to work on non host instances
This commit is contained in:
Us3ful-dev 2026-04-09 11:50:25 +02:00
parent d25b762ca5
commit e1a40278b2

View file

@ -50,14 +50,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer)
Minecraft *pMinecraft = Minecraft::GetInstance();
wstring playerName = L"";
if(pMinecraft->localplayers[ui.GetWinUserIndex()] != nullptr)
{
playerName = escapeXML( pMinecraft->localplayers[ui.GetWinUserIndex()]->getDisplayName() );
}
else
{
playerName = escapeXML( pMinecraft->localplayers[ProfileManager.GetPrimaryPad()]->getDisplayName() );
}
playerName = escapeXML( pMinecraft->localplayers[ProfileManager.GetPrimaryPad()]->getDisplayName() );
noNoiseString = replaceAll(noNoiseString,L"{*PLAYER*}",playerName);
Random random(8124371);